Skip to content

Conversation

@slorber
Copy link
Collaborator

@slorber slorber commented Jun 2, 2025

EDIT: for Docusaurus v3.9.2 we are also "fixing/completing" this feature with an additional sidebar_key front matter that you can add to docs: #11490

Motivation

This is now possible to pass a key attribute to sidebar items to uniquely identify them.

Why?

Usage for Docusaurus i18n

The only place Docusaurus uses it is for generating unique i18n translation keys and avoid translation key conflicts (fix #10913).

{
  type: 'category',
  label: 'API', 
  key: 'api-for-feature-1', 
  items: [],
};
// ... somewhere else in the tree
{
  type: 'category',
  label: 'API',
  key: 'api-for-feature-2',
  items: [],
};

If the 2 categories have the same label, we can now use the key to generate unique translation keys docs.<sidebarName>.category.api-for-feature-{1,2} instead of having a translation key conflict docs.<sidebarName>.category.API.

Docusaurus will tell you when there's an i18n key conflict, so it's not really useful to add key attributes ahead of time.

Usage for your own reasons

Alternatively, you may have your own reasons to do so.

For example, you can add key attributes and then swizzle the React sidebar item components and doing something fancy with the key you receive on the client-side.

Test Plan

Unit tests + dogfood

Test links

Dogfood: https://deploy-preview-11228--docusaurus-2.netlify.app/tests/docs/category/category-index-name-conflict

Docs: https://deploy-preview-11228--docusaurus-2.netlify.app/docs/sidebar/#passing-custom-props

@slorber slorber requested a review from Josh-Cena as a code owner June 2, 2025 15:05
@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jun 2, 2025
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 2, 2025
@netlify
Copy link

netlify bot commented Jun 2, 2025

[V2]

Name Link
🔨 Latest commit d7fb90e
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/68666579b4978f00081f3a16
😎 Deploy Preview https://deploy-preview-11228--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Jun 2, 2025

Size Change: +24.1 kB (+0.21%)

Total Size: 11.5 MB

Filename Size Change
website/.docusaurus/globalData.json 34.8 kB +1.87 kB (+5.67%) 🔍
website/.docusaurus/registry.js 168 kB +3.65 kB (+2.22%)
website/.docusaurus/routes.js 82.3 kB +2.62 kB (+3.29%)
website/.docusaurus/routesChunkNames.json 88.1 kB +1.1 kB (+1.27%)
website/build/assets/js/main.********.js 816 kB +5.04 kB (+0.62%)
website/build/assets/js/runtime~main.********.js 37.9 kB +518 B (+1.39%)
website/build/docs/sidebar.html 131 kB +6.22 kB (+4.99%) 🔍
website/build/docs/sidebar/items.html 168 kB +2.91 kB (+1.76%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28.6 kB 0 B
website/.docusaurus/i18n.json 930 B 0 B
website/.docusaurus/site-metadata.json 2.54 kB 0 B
website/build/assets/css/styles.********.css 127 kB 0 B
website/build/blog.html 75.8 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 64.6 kB -1 B (0%)
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 44.2 kB +11 B (+0.02%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 48.5 kB -1 B (0%)
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 28.8 kB -1 B (0%)
website/build/blog/2019/12/30/docusaurus-2019-recap.html 39.2 kB -2 B (-0.01%)
website/build/blog/2020/01/07/tribute-to-endi.html 32.2 kB -1 B (0%)
website/build/blog/2021/01/19/docusaurus-2020-recap.html 50.1 kB -1 B (0%)
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 46.4 kB -2 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 47.2 kB -1 B (0%)
website/build/blog/2021/11/21/algolia-docsearch-migration.html 53.4 kB +11 B (+0.02%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 42.5 kB -1 B (0%)
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 130 kB -1 B (0%)
website/build/blog/2022/09/01/docusaurus-2.1.html 49.6 kB -2 B (0%)
website/build/blog/archive.html 23.2 kB 0 B
website/build/blog/authors.html 49.7 kB 0 B
website/build/blog/authors/j-marcey.html 69.3 kB 0 B
website/build/blog/authors/josh-cena.html 46.2 kB 0 B
website/build/blog/authors/lex-111.html 54.8 kB 0 B
website/build/blog/authors/slorber.html 79.1 kB 0 B
website/build/blog/authors/slorber/authors/2.html 81.4 kB 0 B
website/build/blog/authors/slorber/authors/3.html 80 kB 0 B
website/build/blog/authors/slorber/authors/4.html 96.5 kB 0 B
website/build/blog/authors/yangshun.html 65.2 kB 0 B
website/build/blog/authors/zpao.html 46.7 kB 0 B
website/build/blog/page/2.html 78.5 kB 0 B
website/build/blog/page/3.html 77.1 kB 0 B
website/build/blog/page/4.html 87.9 kB 0 B
website/build/blog/page/5.html 53.2 kB 0 B
website/build/blog/page/6.html 34.1 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 124 kB +3 B (0%)
website/build/blog/releases/2.2.html 49.5 kB -1 B (0%)
website/build/blog/releases/2.3.html 59.8 kB -1 B (0%)
website/build/blog/releases/2.4.html 63.3 kB -1 B (0%)
website/build/blog/releases/3.0.html 104 kB -1 B (0%)
website/build/blog/releases/3.1.html 52.5 kB 0 B
website/build/blog/releases/3.2.html 48.2 kB -1 B (0%)
website/build/blog/releases/3.3.html 55.3 kB -1 B (0%)
website/build/blog/releases/3.4.html 54.5 kB +6 B (+0.01%)
website/build/blog/releases/3.5.html 56.8 kB 0 B
website/build/blog/releases/3.6.html 74.7 kB 0 B
website/build/blog/releases/3.7.html 50 kB 0 B
website/build/blog/releases/3.8.html 84 kB -1 B (0%)
website/build/blog/tags.html 26.9 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 122 kB -1 B (0%)
website/build/docs.html 46.8 kB -1 B (0%)
website/build/docs/advanced.html 29 kB -1 B (0%)
website/build/docs/advanced/architecture.html 28.5 kB +3 B (+0.01%)
website/build/docs/advanced/client.html 67.4 kB -1 B (0%)
website/build/docs/advanced/plugins.html 52.8 kB -1 B (0%)
website/build/docs/advanced/routing.html 67.7 kB +7 B (+0.01%)
website/build/docs/advanced/ssg.html 72 kB -1 B (0%)
website/build/docs/api/docusaurus-config.html 196 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 42.8 kB +3 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 34.5 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 33.5 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 34.8 kB +3 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 38.3 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/logger.html 36.9 kB -1 B (0%)
website/build/docs/api/misc/create-docusaurus.html 32.1 kB -1 B (0%)
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 63.2 kB +3 B (0%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 57.2 kB +3 B (+0.01%)
website/build/docs/api/plugin-methods/i18n-lifecycles.html 55.6 kB +3 B (+0.01%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 156 kB -1 B (0%)
website/build/docs/api/plugin-methods/static-methods.html 42.9 kB +3 B (+0.01%)
website/build/docs/api/plugins.html 30.5 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 57.2 kB +12 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 180 kB +2 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 186 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 71.6 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 45 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 45.7 kB +11 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 47.1 kB +2 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 46.7 kB -5 B (-0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 45.5 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 49.3 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 113 kB +3 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 38.4 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 62.9 kB +5 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 43.3 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 38.7 kB +11 B (+0.03%)
website/build/docs/api/themes.html 28.3 kB -1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-classic.html 41.6 kB +3 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 34.8 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 33.6 kB +3 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 31.5 kB -1 B (0%)
website/build/docs/api/themes/configuration.html 245 kB -1 B (0%)
website/build/docs/blog.html 195 kB +2 B (0%)
website/build/docs/browser-support.html 45.2 kB -1 B (0%)
website/build/docs/category/getting-started.html 26.3 kB 0 B
website/build/docs/category/guides.html 34.1 kB 0 B
website/build/docs/cli.html 57.8 kB -1 B (0%)
website/build/docs/configuration.html 89.2 kB +6 B (+0.01%)
website/build/docs/create-doc.html 56.9 kB +11 B (+0.02%)
website/build/docs/creating-pages.html 54.3 kB 0 B
website/build/docs/deployment.html 207 kB +5 B (0%)
website/build/docs/docs-introduction.html 47.8 kB -1 B (0%)
website/build/docs/docs-multi-instance.html 70 kB +3 B (0%)
website/build/docs/docusaurus-core.html 218 kB -1 B (0%)
website/build/docs/guides/whats-next.html 30.5 kB -1 B (0%)
website/build/docs/i18n/crowdin.html 133 kB +11 B (+0.01%)
website/build/docs/i18n/git.html 73.8 kB +3 B (0%)
website/build/docs/i18n/introduction.html 46.2 kB -1 B (0%)
website/build/docs/i18n/tutorial.html 152 kB +12 B (+0.01%)
website/build/docs/installation.html 62.1 kB +4 B (+0.01%)
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 76.2 kB -1 B (0%)
website/build/docs/markdown-features/admonitions.html 106 kB +3 B (0%)
website/build/docs/markdown-features/assets.html 82.7 kB +1 B (0%)
website/build/docs/markdown-features/code-blocks.html 213 kB +6 B (0%)
website/build/docs/markdown-features/diagrams.html 49 kB +13 B (+0.03%)
website/build/docs/markdown-features/head-metadata.html 48 kB -1 B (0%)
website/build/docs/markdown-features/links.html 38.6 kB -1 B (0%)
website/build/docs/markdown-features/math-equations.html 85.8 kB +3 B (0%)
website/build/docs/markdown-features/plugins.html 91.5 kB +7 B (+0.01%)
website/build/docs/markdown-features/react.html 128 kB -1 B (0%)
website/build/docs/markdown-features/tabs.html 135 kB -1 B (0%)
website/build/docs/markdown-features/toc.html 78.9 kB +3 B (0%)
website/build/docs/migration.html 37.2 kB +3 B (+0.01%)
website/build/docs/migration/v2.html 37.5 kB -1 B (0%)
website/build/docs/migration/v2/automated.html 38.1 kB -1 B (0%)
website/build/docs/migration/v2/manual.html 183 kB -1 B (0%)
website/build/docs/migration/v2/translated-sites.html 48.7 kB -1 B (0%)
website/build/docs/migration/v2/versioned-sites.html 57.8 kB +7 B (+0.01%)
website/build/docs/migration/v3.html 184 kB +1 B (0%)
website/build/docs/playground.html 30.3 kB -1 B (0%)
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 109 kB 0 B
website/build/docs/seo.html 84.4 kB +12 B (+0.01%)
website/build/docs/sidebar/autogenerated.html 140 kB +12 B (+0.01%)
website/build/docs/sidebar/multiple-sidebars.html 58.8 kB +3 B (+0.01%)
website/build/docs/static-assets.html 49.2 kB +3 B (+0.01%)
website/build/docs/styling-layout.html 131 kB 0 B
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 107 kB +13 B (+0.01%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 58.1 kB +3 B (+0.01%)
website/build/docs/using-plugins.html 102 kB -1 B (0%)
website/build/docs/versioning.html 87.5 kB -3 B (0%)
website/build/index.html 35.1 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_FASTER

@github-actions
Copy link

github-actions bot commented Jun 2, 2025

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🔴 40 🟢 98 🟢 100 🟢 100 Report
/docs/installation 🔴 48 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 71 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 59 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 58 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 58 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 67 🟢 100 🟢 100 🟠 86 Report

@github-actions
Copy link

github-actions bot commented Jun 2, 2025

Size Change: +24.4 kB (+0.2%)

Total Size: 11.9 MB

Filename Size Change
website/.docusaurus/globalData.json 34.8 kB +1.87 kB (+5.67%) 🔍
website/.docusaurus/registry.js 168 kB +3.65 kB (+2.22%)
website/.docusaurus/routes.js 82.3 kB +2.62 kB (+3.29%)
website/.docusaurus/routesChunkNames.json 88.1 kB +1.1 kB (+1.27%)
website/build/assets/js/main.********.js 818 kB +5.02 kB (+0.62%)
website/build/assets/js/runtime~main.********.js 37.5 kB +517 B (+1.4%)
website/build/docs/sidebar.html 137 kB +6.45 kB (+4.95%) 🔍
website/build/docs/sidebar/items.html 175 kB +3 kB (+1.75%)
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28.6 kB 0 B
website/.docusaurus/i18n.json 930 B 0 B
website/.docusaurus/site-metadata.json 2.38 kB 0 B
website/build/assets/css/styles.********.css 120 kB 0 B
website/build/blog.html 78.6 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 66.9 kB -1 B (0%)
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 46.2 kB +11 B (+0.02%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 50.6 kB -1 B (0%)
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 30.4 kB -1 B (0%)
website/build/blog/2019/12/30/docusaurus-2019-recap.html 41.2 kB -2 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 34 kB -1 B (0%)
website/build/blog/2021/01/19/docusaurus-2020-recap.html 52.3 kB -1 B (0%)
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 48.5 kB -2 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 49.4 kB -1 B (0%)
website/build/blog/2021/11/21/algolia-docsearch-migration.html 55.8 kB +11 B (+0.02%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 44.6 kB -1 B (0%)
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 135 kB -1 B (0%)
website/build/blog/2022/09/01/docusaurus-2.1.html 52 kB -2 B (0%)
website/build/blog/archive.html 24.7 kB 0 B
website/build/blog/authors.html 52 kB 0 B
website/build/blog/authors/j-marcey.html 72.1 kB 0 B
website/build/blog/authors/josh-cena.html 48.4 kB 0 B
website/build/blog/authors/lex-111.html 57.3 kB 0 B
website/build/blog/authors/slorber.html 82.1 kB 0 B
website/build/blog/authors/slorber/authors/2.html 84.5 kB 0 B
website/build/blog/authors/slorber/authors/3.html 83 kB 0 B
website/build/blog/authors/slorber/authors/4.html 100 kB 0 B
website/build/blog/authors/yangshun.html 68 kB 0 B
website/build/blog/authors/zpao.html 48.8 kB 0 B
website/build/blog/page/2.html 81.3 kB 0 B
website/build/blog/page/3.html 79.9 kB 0 B
website/build/blog/page/4.html 91 kB 0 B
website/build/blog/page/5.html 55.5 kB 0 B
website/build/blog/page/6.html 35.9 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 129 kB -2 B (0%)
website/build/blog/releases/2.2.html 51.9 kB -1 B (0%)
website/build/blog/releases/2.3.html 62.5 kB -1 B (0%)
website/build/blog/releases/2.4.html 66.2 kB -1 B (0%)
website/build/blog/releases/3.0.html 108 kB -1 B (0%)
website/build/blog/releases/3.1.html 54.8 kB 0 B
website/build/blog/releases/3.2.html 50.5 kB -1 B (0%)
website/build/blog/releases/3.3.html 57.7 kB -1 B (0%)
website/build/blog/releases/3.4.html 56.9 kB +6 B (+0.01%)
website/build/blog/releases/3.5.html 59.3 kB 0 B
website/build/blog/releases/3.6.html 77.9 kB 0 B
website/build/blog/releases/3.7.html 52.4 kB 0 B
website/build/blog/releases/3.8.html 87.3 kB -1 B (0%)
website/build/blog/tags.html 28.6 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 126 kB -1 B (0%)
website/build/docs.html 48.8 kB -1 B (0%)
website/build/docs/advanced.html 30.6 kB -1 B (0%)
website/build/docs/advanced/architecture.html 30.1 kB +3 B (+0.01%)
website/build/docs/advanced/client.html 70.3 kB -1 B (0%)
website/build/docs/advanced/plugins.html 55.2 kB -1 B (0%)
website/build/docs/advanced/routing.html 70.4 kB +7 B (+0.01%)
website/build/docs/advanced/ssg.html 75.2 kB -1 B (0%)
website/build/docs/api/docusaurus-config.html 204 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 45.2 kB +3 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 36.4 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 35.3 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 36.6 kB +3 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 40.3 kB -1 B (0%)
website/build/docs/api/misc/@docusaurus/logger.html 38.7 kB -1 B (0%)
website/build/docs/api/misc/create-docusaurus.html 33.8 kB -1 B (0%)
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 65.8 kB +3 B (0%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 59.6 kB +3 B (+0.01%)
website/build/docs/api/plugin-methods/i18n-lifecycles.html 57.9 kB +3 B (+0.01%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 162 kB -1 B (0%)
website/build/docs/api/plugin-methods/static-methods.html 44.9 kB +3 B (+0.01%)
website/build/docs/api/plugins.html 32.2 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 60 kB +12 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 188 kB +2 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 194 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 75.3 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 47.2 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 47.9 kB +11 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 49.5 kB +2 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 49 kB -5 B (-0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 47.8 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 51.9 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 118 kB +3 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 40.4 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 65.9 kB +5 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 45.6 kB -1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 40.8 kB +11 B (+0.03%)
website/build/docs/api/themes.html 29.9 kB -1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-classic.html 43.7 kB +3 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 36.7 kB +1 B (0%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 35.4 kB +3 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 33.2 kB -1 B (0%)
website/build/docs/api/themes/configuration.html 257 kB -1 B (0%)
website/build/docs/blog.html 202 kB +2 B (0%)
website/build/docs/browser-support.html 47.5 kB -1 B (0%)
website/build/docs/category/getting-started.html 27.8 kB 0 B
website/build/docs/category/guides.html 35.9 kB 0 B
website/build/docs/cli.html 61.4 kB -1 B (0%)
website/build/docs/configuration.html 93 kB +6 B (+0.01%)
website/build/docs/create-doc.html 59.5 kB +11 B (+0.02%)
website/build/docs/creating-pages.html 56.8 kB 0 B
website/build/docs/deployment.html 214 kB +5 B (0%)
website/build/docs/docs-introduction.html 50.1 kB -1 B (0%)
website/build/docs/docs-multi-instance.html 73.3 kB +3 B (0%)
website/build/docs/docusaurus-core.html 226 kB -1 B (0%)
website/build/docs/guides/whats-next.html 32.2 kB -1 B (0%)
website/build/docs/i18n/crowdin.html 139 kB +11 B (+0.01%)
website/build/docs/i18n/git.html 77.1 kB +3 B (0%)
website/build/docs/i18n/introduction.html 48.4 kB -1 B (0%)
website/build/docs/i18n/tutorial.html 158 kB +12 B (+0.01%)
website/build/docs/installation.html 64.9 kB +4 B (+0.01%)
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 79.1 kB -1 B (0%)
website/build/docs/markdown-features/admonitions.html 111 kB +3 B (0%)
website/build/docs/markdown-features/assets.html 86.7 kB +1 B (0%)
website/build/docs/markdown-features/code-blocks.html 221 kB +6 B (0%)
website/build/docs/markdown-features/diagrams.html 51.5 kB +13 B (+0.03%)
website/build/docs/markdown-features/head-metadata.html 50.4 kB -1 B (0%)
website/build/docs/markdown-features/links.html 40.7 kB -1 B (0%)
website/build/docs/markdown-features/math-equations.html 89.8 kB +3 B (0%)
website/build/docs/markdown-features/plugins.html 95.3 kB +7 B (+0.01%)
website/build/docs/markdown-features/react.html 134 kB -1 B (0%)
website/build/docs/markdown-features/tabs.html 141 kB -1 B (0%)
website/build/docs/markdown-features/toc.html 82.4 kB +3 B (0%)
website/build/docs/migration.html 39.2 kB -2 B (-0.01%)
website/build/docs/migration/v2.html 39.4 kB -1 B (0%)
website/build/docs/migration/v2/automated.html 40.1 kB -1 B (0%)
website/build/docs/migration/v2/manual.html 191 kB -1 B (0%)
website/build/docs/migration/v2/translated-sites.html 51 kB -1 B (0%)
website/build/docs/migration/v2/versioned-sites.html 60.3 kB +7 B (+0.01%)
website/build/docs/migration/v3.html 192 kB +1 B (0%)
website/build/docs/playground.html 31.9 kB -1 B (0%)
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 113 kB 0 B
website/build/docs/seo.html 88.3 kB +12 B (+0.01%)
website/build/docs/sidebar/autogenerated.html 145 kB +12 B (+0.01%)
website/build/docs/sidebar/multiple-sidebars.html 61.8 kB +3 B (0%)
website/build/docs/static-assets.html 51.6 kB +3 B (+0.01%)
website/build/docs/styling-layout.html 136 kB 0 B
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 111 kB +13 B (+0.01%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 60.8 kB +3 B (0%)
website/build/docs/using-plugins.html 106 kB -1 B (0%)
website/build/docs/versioning.html 91.4 kB -3 B (0%)
website/build/index.html 36.9 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_SLOWER

@slorber slorber marked this pull request as ready for review June 27, 2025 14:55
@slorber slorber linked an issue Jun 27, 2025 that may be closed by this pull request
7 tasks
@slorber slorber changed the title fix(docs): fix docs translations key conflicts feat(docs): sidebar item key attribute - fix docs translations key conflicts Jul 3, 2025
@slorber slorber merged commit da08536 into main Jul 3, 2025
42 of 46 checks passed
@slorber slorber deleted the slorber/fix-docs-category-index-translation-key-conflict branch July 3, 2025 11:40
@slorber slorber added pr: new feature This PR adds a new API or behavior. and removed pr: bug fix This PR fixes a bug in a past release. labels Jul 3, 2025
josh-wong added a commit to scalar-labs/docs-scalardb that referenced this pull request Oct 6, 2025
When labels have duplicate names, the sidebar must contain a `key` attribute. Without these `key` attributes, Docusaurus 3.9 (and likely later unless this specification changes) will encounter errors during the build process.

As described in the Docusaurus blog post for 3.9: "In #11228, we added a new `key` attribute to the docs sidebar items, allowing to assign explicit translation keys to each sidebar item that use the same label and would otherwise lead to translation key conflicts."

Related Docusaurus PR: facebook/docusaurus#11228
josh-wong added a commit to scalar-labs/docs-scalardl that referenced this pull request Oct 6, 2025
When labels have duplicate names, the sidebar must contain a `key` attribute. Without these `key` attributes, Docusaurus 3.9 (and likely later unless this specification changes) will encounter errors during the build process.

As described in the Docusaurus blog post for 3.9: "In #11228, we added a new `key` attribute to the docs sidebar items, allowing to assign explicit translation keys to each sidebar item that use the same label and would otherwise lead to translation key conflicts."

Related Docusaurus PR: facebook/docusaurus#11228
josh-wong added a commit to scalar-labs/docs-scalardl that referenced this pull request Nov 4, 2025
* Upgrade Docusaurus from 3.7.0 to 3.9.1

* Move `onBrokenMarkdownLinks` to markdown hooks

The onBrokenMarkdownLinks option was removed from the root config and added under markdown.hooks to align with updated Docusaurus configuration structure. This change complies with a change made in Docusaurus 3.9: facebook/docusaurus#11283

* Add `onDuplicateRoutes` configuration

* Change version number in description

* Update Node.js version to `20`

Bump Node.js version from `18` to `20` in deploy and test-deploy GitHub Actions workflows to ensure compatibility with the latest Node.js features and security updates. This is necessary because Docusaurus 3.9 drops support for Node.js 18: https://docusaurus.io/blog/releases/3.9#dropping-nodejs-18

* Ensure output directory exists before writing JSON

Added logic to create the output directory if it does not exist before writing the glossary JSON file. This prevents errors when the specified output path's directory is missing.

* Add `key` attributes for labels with duplicate names

When labels have duplicate names, the sidebar must contain a `key` attribute. Without these `key` attributes, Docusaurus 3.9 (and likely later unless this specification changes) will encounter errors during the build process.

As described in the Docusaurus blog post for 3.9: "In #11228, we added a new `key` attribute to the docs sidebar items, allowing to assign explicit translation keys to each sidebar item that use the same label and would otherwise lead to translation key conflicts."

Related Docusaurus PR: facebook/docusaurus#11228

* Add `colorMode` to respect user's light/dark theme preference

Introduced a colorMode section in the Docusaurus config to set the default mode to light, enable the color mode switch, and respect the user's preferred color scheme.

* Change `current` to version number (`3.12`)

* Change format of `key` values

Addresses: #1011 (comment)
Co-Authored-By: Jun Nemoto <35618893+jnmt@users.noreply.github.com>

* Upgrade Docusaurus form 3.9.1 to 3.9.2

---------

Co-authored-by: Jun Nemoto <35618893+jnmt@users.noreply.github.com>
josh-wong added a commit to scalar-labs/docs-scalardb that referenced this pull request Nov 4, 2025
* Move `onBrokenMarkdownLinks` to markdown hooks

The onBrokenMarkdownLinks option was removed from the root config and added under markdown.hooks to align with updated Docusaurus configuration structure. This change complies with a change made in Docusaurus 3.9: facebook/docusaurus#11283

* Fix link to ABAC doc in Japanese

* Upgrade Docusaurus from 3.7.0 to 3.9.1

* Change `current` to `3.15` in description

* Add `onDuplicateRoutes` configuration

* Fix incorrect label

* Add `key` attributes for labels with duplicate names

When labels have duplicate names, the sidebar must contain a `key` attribute. Without these `key` attributes, Docusaurus 3.9 (and likely later unless this specification changes) will encounter errors during the build process.

As described in the Docusaurus blog post for 3.9: "In #11228, we added a new `key` attribute to the docs sidebar items, allowing to assign explicit translation keys to each sidebar item that use the same label and would otherwise lead to translation key conflicts."

Related Docusaurus PR: facebook/docusaurus#11228

* Change URL identifiers

Change as suggested by Gemini code review: #1564 (comment)

* Ensure output directory exists before writing JSON

Added logic to create the output directory if it does not exist before writing the glossary JSON file. This prevents errors when the specified output path's directory is missing.

* Update Node.js version to `20`

Bump Node.js version from `18` to `20` in deploy and test-deploy GitHub Actions workflows to ensure compatibility with the latest Node.js features and security updates. This is necessary because Docusaurus 3.9 drops support for Node.js 18: https://docusaurus.io/blog/releases/3.9#dropping-nodejs-18

* Add `colorMode` to respect user's light/dark theme preference

Introduced a colorMode section in the Docusaurus config to set the default mode to light, enable the color mode switch, and respect the user's preferred color scheme.

* Change format of `key` values

Addresses the following comment made in the ScalarDL docs site repository: scalar-labs/docs-scalardl#1011 (comment)

* Upgrade Docusaurus from 3.9.1 to 3.9.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Labels do not have unique translation keys

3 participants