Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(macros/HTTPSidebar): Reorg HTTP sidebar after doc reshuffle, delete 'Basics of HTTP' #11753

Merged
merged 12 commits into from
Oct 2, 2024
Merged
224 changes: 118 additions & 106 deletions kumascript/macros/HTTPSidebar.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ function state(section) {
var text = mdn.localStringMap({
'en-US': {
'HTTP': 'HTTP',
'HTTPGuide': 'HTTP guide',
'Basics': 'Basics of HTTP',
'Concepts': 'HTTP concepts',
'Overview': 'Overview of HTTP',
'Evolution': 'Evolution of HTTP',
'ResourcesURI': 'Resources and URIs',
'URIsResources': 'URIs and resources',
'Identifying': 'Identifying resources on the Web',
bsmth marked this conversation as resolved.
Show resolved Hide resolved
'DataURLs': 'Data URLs',
'MIMETypes': 'Introduction to MIME types',
'ListMIMETypes': 'Common MIME types',
'WWWorNotWWW': 'Choosing between www and non-www URLs',
'WWWorNotWWW': 'Choosing www or non-www URLs',
'Messages': 'HTTP Messages',
'Session': 'A typical HTTP session',
'Connection1x': 'Connection management in HTTP/1.x',
Expand All @@ -37,8 +36,8 @@ var text = mdn.localStringMap({
'Compression': 'HTTP compression',
'Cookies': 'HTTP cookies',
'Caching': 'HTTP caching',
'CORS': 'HTTP access control (CORS)',
'Resources': 'HTTP specifications',
'CORS': 'Cross-Origin Resource Sharing (CORS)',
'Specifications': 'HTTP specifications',
'Permissions_Policy': 'Permissions Policy',
'Guides': 'Guides',
'Reference': 'References',
Expand All @@ -47,18 +46,21 @@ var text = mdn.localStringMap({
'CSPDirectives': 'CSP directives',
'CORS_errors': 'CORS errors',
'PermissionsPolicyDirectives': 'Permissions-Policy directives',
'Security': 'HTTP security',
'Security': 'Security and privacy',
'Authentication': 'HTTP authentication',
'ProtocolUpgradeMech': 'Protocol upgrade mechanism',
'CSP': 'Content Security Policy (CSP)'
'CSP': 'Content Security Policy (CSP)',
'Proxies': 'Proxy servers and tunneling',
'CORP': 'Cross-Origin Resource Policy (CORP)',
'SecurityGuides': 'Security implementation guides',
'ClientHints': "HTTP client hints"
},
'es': {
'HTTP': 'HTTP',
'HTTPGuide': 'Guía de HTTP',
'Basics': 'Fundamentos de HTTP',
'Concepts': 'Guía de HTTP',
'Overview': 'Generalidades de HTTP',
'Evolution': 'Evolución de HTTP',
'ResourcesURI': 'Recursos y URIs',
'URIsResources': 'Recursos y URIs',
'Identifying': 'Identificación de recursos en la Web',
'DataURLs': 'URLs de Datos',
'MIMETypes': 'Presentación de tipos MIME',
Expand All @@ -77,23 +79,26 @@ var text = mdn.localStringMap({
'Cookies': 'Cookies HTTP',
'Caching': 'Caché HTTP',
'CORS': 'Control de acceso en HTTP(CORS)',
'Resources': 'La especificación de HTTP',
'Specifications': 'La especificación de HTTP',
'Guides': 'Guías',
'Reference': 'Referencias',
'Methods': 'Métodos de petición HTTP',
'Status': 'Códigos de estado de HTTP',
'CSPDirectives': 'Directivas CSP',
'Security': 'Seguridad en HTTP',
'Authentication': 'Autenticación en HTTP',
'CSP': 'Content Security Policy (CSP)'
'CSP': 'Content Security Policy (CSP)',
'Proxies': 'Proxy servers and tunneling',
'CORP': 'Cross-Origin Resource Policy (CORP)',
'SecurityGuides': 'Security implementation guides',
'ClientHints': 'HTTP client hints'
},
'fr': {
'HTTP': 'HTTP',
'HTTPGuide': 'Guide HTTP',
'Basics': 'Notions élémentaires de HTTP',
'Concepts': 'Guide HTTP',
'Overview': 'Aperçu de HTTP',
'Evolution': 'Évolution de HTTP',
'ResourcesURI': 'Ressources et URI',
'URIsResources': 'Ressources et URI',
'Identifying': 'Identifier des ressources sur le Web',
'DataURLs': 'URL de données',
'MIMETypes': 'Introduction aux types MIME',
Expand All @@ -112,7 +117,7 @@ var text = mdn.localStringMap({
'Cookies': 'Cookies HTTP',
'Caching': 'Cache HTTP',
'CORS': 'Contrôle d\'accès HTTP',
'Resources': 'Spécifications HTTP',
'Specifications': 'Spécifications HTTP',
'Permissions_Policy': 'Règles de fonctionnalité',
'Guides': 'Guides',
'Reference': 'Références',
Expand All @@ -124,15 +129,18 @@ var text = mdn.localStringMap({
'Security': 'Sécurité HTTP',
'Authentication': 'Authentification HTTP',
'ProtocolUpgradeMech': 'Mécanisme d\'amélioration du protocole',
'CSP': 'Content Security Policy (CSP)'
'CSP': 'Content Security Policy (CSP)',
'Proxies': 'Proxy servers and tunneling',
'CORP': 'Cross-Origin Resource Policy (CORP)',
'SecurityGuides': 'Security implementation guides',
'ClientHints': 'HTTP client hints'
},
'ja': {
'HTTP': 'HTTP',
'HTTPGuide': 'HTTP ガイド',
'Basics': 'HTTP の基本',
'Concepts': 'HTTP ガイド',
'Overview': 'HTTP の概要',
'Evolution': 'HTTP の進化',
'ResourcesURI': 'リソースと URI',
'URIsResources': 'リソースと URI',
'Identifying': 'ウェブ上のリソースの識別',
'DataURLs': 'データ URL',
'MIMETypes': 'MIME タイプ入門',
Expand All @@ -151,7 +159,7 @@ var text = mdn.localStringMap({
'Cookies': 'HTTP Cookie',
'Caching': 'HTTP キャッシュ',
'CORS': 'HTTP アクセス制御 (CORS)',
'Resources': 'HTTP 仕様書',
'Specifications': 'HTTP 仕様書',
'Permissions_Policy': '機能ポリシー',
'Guides': 'ガイド',
'Reference': 'リファレンス',
Expand All @@ -163,15 +171,18 @@ var text = mdn.localStringMap({
'Security': 'HTTP セキュリティ',
'Authentication': 'HTTP 認証',
'ProtocolUpgradeMech': 'プロトコルのアップグレードの仕組み',
'CSP': 'Content Security Policy (CSP)'
'CSP': 'Content Security Policy (CSP)',
'Proxies': 'Proxy servers and tunneling',
'CORP': 'Cross-Origin Resource Policy (CORP)',
'SecurityGuides': 'Security implementation guides',
'ClientHints': 'HTTP client hints'
},
'ko': {
'HTTP': 'HTTP',
'HTTPGuide': 'HTTP 안내서',
'Basics': 'HTTP 기본',
'Concepts': 'HTTP 안내서',
'Overview': 'HTTP 개요',
'Evolution': 'HTTP의 진화',
'ResourcesURI': '리소스와 URIs',
'URIsResources': '리소스와 URIs',
'Identifying': '웹의 리소스 식별하기',
'DataURLs': '데이터 URLs',
'MIMETypes': 'MIME 타입 소개',
Expand All @@ -190,7 +201,7 @@ var text = mdn.localStringMap({
'Cookies': 'HTTP 쿠키',
'Caching': 'HTTP 캐싱',
'CORS': 'HTTP 접근 제어(CORS)',
'Resources': 'HTTP 명세',
'Specifications': 'HTTP 명세',
'Permissions_Policy': 'Permissions policy',
'Guides': '가이드',
'Reference': '레퍼런스',
Expand All @@ -202,20 +213,23 @@ var text = mdn.localStringMap({
'Security': 'HTTP 보안',
'Authentication': 'HTTP 인증',
'ProtocolUpgradeMech': '프로토콜 업그레이드 메커니즘',
'CSP': 'Content Security Policy (CSP)'
'CSP': 'Content Security Policy (CSP)',
'Proxies': 'Proxy servers and tunneling',
'CORP': 'Cross-Origin Resource Policy (CORP)',
'SecurityGuides': 'Security implementation guides',
'ClientHints': 'HTTP client hints'
},
'ru': {
'HTTP': 'HTTP',
'HTTPGuide': 'Руководство по HTTP',
'Basics': 'Основы HTTP',
'Concepts': 'Руководство по HTTP',
'Overview': 'Обзор протокола HTTP',
'Evolution': 'Эволюция протокола HTTP',
'ResourcesURI': 'Ресурсы и URI-адреса',
'URIsResources': 'Ресурсы и URI-адреса',
'Identifying': 'Идентификация ресурсов в Вебе',
'DataURLs': 'Data URL',
'MIMETypes': 'Введение в MIME типы',
'ListMIMETypes': 'Неполный список типов MIME',
'WWWorNotWWW': 'Choosing between www and non-www URLs',
'WWWorNotWWW': 'Choosing www or non-www URLs',
'Messages': 'Сообщения HTTP',
'Session': 'HTTP сессия',
'Connection1x': 'Управление подключениями в HTTP/1.x',
Expand All @@ -229,7 +243,7 @@ var text = mdn.localStringMap({
'Cookies': 'Куки HTTP',
'Caching': 'HTTP-кеширование',
'CORS': 'Контроль доступа в HTTP (CORS)',
'Resources': 'Спецификации HTTP',
'Specifications': 'Спецификации HTTP',
'Permissions_Policy': 'Permissions policy',
'Guides': 'Учебники',
'Reference': 'Справочники',
Expand All @@ -241,15 +255,18 @@ var text = mdn.localStringMap({
'Security': 'Безопасность в HTTP',
'Authentication': 'HTTP авторизация',
'ProtocolUpgradeMech': 'Protocol upgrade mechanism',
'CSP': 'Content Security Policy (CSP)'
'CSP': 'Content Security Policy (CSP)',
'Proxies': 'Proxy servers and tunneling',
'CORP': 'Cross-Origin Resource Policy (CORP)',
'SecurityGuides': 'Security implementation guides',
'ClientHints': 'HTTP client hints'
},
'zh-CN': {
'HTTP': 'HTTP',
'HTTPGuide': 'HTTP 指南',
'Basics': 'HTTP 基础',
'Concepts': 'HTTP 指南',
'Overview': 'HTTP 概述',
'Evolution': 'HTTP 的发展',
'ResourcesURI': '资源和 URI',
'URIsResources': '资源和 URI',
'Identifying': '标识互联网上的内容',
'DataURLs': 'Data URL',
'MIMETypes': 'MIME 类型介绍',
Expand All @@ -268,7 +285,7 @@ var text = mdn.localStringMap({
'Cookies': 'HTTP cookie',
'Caching': 'HTTP 缓存',
'CORS': 'HTTP 访问控制(CORS)',
'Resources': 'HTTP 规范',
'Specifications': 'HTTP 规范',
'Permissions_Policy': '权限策略',
'Guides': '指南:',
'Reference': '参考:',
Expand All @@ -280,7 +297,11 @@ var text = mdn.localStringMap({
'Security': 'HTTP 安全',
'Authentication': 'HTTP 认证',
'ProtocolUpgradeMech': '协议升级机制',
'CSP': '内容安全策略(CSP)'
'CSP': '内容安全策略(CSP)',
'Proxies': 'Proxy servers and tunneling',
'CORP': 'Cross-Origin Resource Policy (CORP)',
'SecurityGuides': 'Security implementation guides',
'ClientHints': 'HTTP client hints'
}
});
%>
Expand All @@ -291,93 +312,84 @@ var text = mdn.localStringMap({
<li class="section"><%-web.smartLink(`/${locale}/docs/Web/HTTP`, null, text['HTTP'])%></li>
<li class="section no-link"><%=text['Guides']%></li>
<li class="toggle">
<details>
<summary><%=text['ResourcesURI']%></summary>
<ol>
<li><%-web.smartLink(`/${locale}/docs/Web/URI`, null, text['Identifying'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/URI/Schemes/data`, null, text['DataURLs'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Basics_of_HTTP/MIME_types`, null, text['MIMETypes'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types`, null, text['ListMIMETypes'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/URI/Authority/Choosing_between_www_and_non-www_URLs`, null, text['WWWorNotWWW'])%></li>
</ol>
</details>
<details>
<summary><%=text['Concepts']%></summary>
<ol>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Overview`, null, text['Overview'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Messages`, null, text['Messages'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers`, null, text['Headers'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Methods`, null, text['Methods'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Status`, null, text['Status'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Session`, null, text['Session'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Compression`, null, text['Compression'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Content_negotiation`, null, text['ContentNego'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Proxy_servers_and_tunneling`, null, text['Proxies'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Connection_management_in_HTTP_1.x`, null, text['Connection1x'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Protocol_upgrade_mechanism`, null, text['ProtocolUpgradeMech'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Evolution_of_HTTP`, null, text['Evolution'])%></li>
caugner marked this conversation as resolved.
Show resolved Hide resolved
</ol>
</details>
</li>
<li class="toggle">
<details>
<summary><%=text['HTTPGuide']%></summary>
<ol>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Basics_of_HTTP`, null, text['Basics'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Overview`, null, text['Overview'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP`, null, text['Evolution'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Messages`, null, text['Messages'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Session`, null, text['Session'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Connection_management_in_HTTP_1.x`, null, text['Connection1x'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Protocol_upgrade_mechanism`, null, text['ProtocolUpgradeMech'])%></li>
</ol>
</details>
<details>
<summary><%=text['Security']%></summary>
<ol>
<li><%-web.smartLink(`/${locale}/docs/Web/Security/Practical_implementation_guides`, null, text['SecurityGuides'])%></li>
<li><a href="/en-US/observatory">HTTP Observatory</a></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Permissions_Policy`, null, text['Permissions_Policy'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/CSP`, null, text['CSP'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/CORS`, null, text['CORS'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Cross-Origin_Resource_Policy`, null, text['CORP'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers/Strict-Transport-Security`, null, "HTTP Strict Transport Security (HSTS)")%></li>
bsmth marked this conversation as resolved.
Show resolved Hide resolved
</ol>
</details>
</li>
<li class="toggle">
<details>
<summary><%=text['Security']%></summary>
<ol>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/CSP`, null, text['CSP'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers/Strict-Transport-Security`, null, "HTTP Strict Transport Security (HSTS)")%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers/X-Content-Type-Options`, null, "X-Content-Type-Options")%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers/X-Frame-Options`, null, "X-Frame-Options")%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers/X-XSS-Protection`, null, "X-XSS-Protection")%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/Security/Practical_implementation_guides`)%></li>
<li><a href="/en-US/observatory">HTTP Observatory</a></li>
</ol>
</details>
</li>

<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/CORS`, null, text['CORS'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Authentication`, null, text['Authentication'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Caching`, null, text['Caching'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Compression`, null, text['Compression'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Client_hints`, null, text['ClientHints'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Conditional_requests`, null, text['Conditionals'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Content_negotiation`, null, text['ContentNego'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Cookies`, null, text['Cookies'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Range_requests`, null, text['Ranges'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Redirections`, null, text['Redirects'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Resources_and_specifications`, null, text['Resources'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Permissions_Policy`, null, text['Permissions_Policy'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/HTTP/Resources_and_specifications`, null, text['Specifications'])%></li>
<li><%-web.smartLink(`/${locale}/docs/Web/URI`, null, text['URIsResources'])%></li>

<li class="section no-link"><%=text['Reference']%></li>
<li class="toggle">
<details <%=state('Web/HTTP/Headers')%>>
<summary><%=text['Headers']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Headers'])%>
</details>
<details <%=state('Web/HTTP/Headers')%>>
<summary><%=text['Headers']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Headers'])%>
</details>
</li>
<li class="toggle">
<details <%=state('Web/HTTP/Methods')%>>
<summary><%=text['Methods']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Methods'])%>
</details>
<details <%=state('Web/HTTP/Methods')%>>
<summary><%=text['Methods']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Methods'])%>
</details>
</li>
<li class="toggle">
<details <%=state('Web/HTTP/Status')%>>
<summary><%=text['Status']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Status'])%>
</details>
<details <%=state('Web/HTTP/Status')%>>
<summary><%=text['Status']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Status'])%>
</details>
</li>
<li class="toggle">
<details <%=state('Web/HTTP/Headers/Content-Security-Policy')%>>
<summary><%=text['CSPDirectives']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Headers/Content-Security-Policy'])%>
</details>
<details <%=state('Web/HTTP/Headers/Content-Security-Policy')%>>
<summary><%=text['CSPDirectives']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Headers/Content-Security-Policy'])%>
</details>
</li>
<li class="toggle">
<details <%=state('Web/HTTP/CORS/Errors')%>>
<summary><%=text['CORS_errors']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/CORS/Errors', 1])%>
</details>
<details <%=state('Web/HTTP/CORS/Errors')%>>
<summary><%=text['CORS_errors']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/CORS/Errors', 1])%>
</details>
</li>
<li class="toggle">
<details <%=state('Web/HTTP/Headers/Permissions-Policy')%>>
<summary><%=text['PermissionsPolicyDirectives']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Headers/Permissions-Policy', 1])%>
</details>
<details <%=state('Web/HTTP/Headers/Permissions-Policy')%>>
<summary><%=text['PermissionsPolicyDirectives']%></summary>
<%-await template("ListSubpagesForSidebar", ['/en-US/docs/Web/HTTP/Headers/Permissions-Policy', 1])%>
</details>
</li>
</ol>
</section>
</section>
Loading