Repository navigation
fix: follow Docusaurus version routing and i18n content in versions mode - #88
Merged
Merged
Conversation
- versions: 'auto' builds versions the way plugin-content-docs does (lastVersion, includeCurrentVersion, onlyIncludeVersions, per-version path; routes at /<routeBasePath>/<versionPath>/), writes each version to <outDir>/<versionPath>/ and scopes each doc to its version's routes. Explicit versions accept routePrefix: '' for the same layout. - A non-default locale reads each doc and blog post from its translation under the localization directory when one exists. - Per-version docsDir, customLLMFiles and includeOrder get the top-level validation; a version that fails at runtime is logged and the remaining versions still generate. - In versions mode the blog is listed in the root version only.
Docusaurus reads a locale's localization directory first for every locale, the default included (getVersionMetadataPaths and getContentPathList in @docusaurus/plugin-content-docs and @docusaurus/utils), unless the locale sets translate: false. Apply the same rule, so i18n/<defaultLocale>/ overrides reach llms.txt.
rachfop
added a commit
that referenced
this pull request
Oct 2, 2026
…ode (#88) * fix: follow Docusaurus version routing and i18n content in versions mode - versions: 'auto' builds versions the way plugin-content-docs does (lastVersion, includeCurrentVersion, onlyIncludeVersions, per-version path; routes at /<routeBasePath>/<versionPath>/), writes each version to <outDir>/<versionPath>/ and scopes each doc to its version's routes. Explicit versions accept routePrefix: '' for the same layout. - A non-default locale reads each doc and blog post from its translation under the localization directory when one exists. - Per-version docsDir, customLLMFiles and includeOrder get the top-level validation; a version that fails at runtime is logged and the remaining versions still generate. - In versions mode the blog is listed in the root version only. * fix: read translated files for the default locale too Docusaurus reads a locale's localization directory first for every locale, the default included (getVersionMetadataPaths and getContentPathList in @docusaurus/plugin-content-docs and @docusaurus/utils), unless the locale sets translate: false. Apply the same rule, so i18n/<defaultLocale>/ overrides reach llms.txt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Versioned and translated sites got wrong links and the wrong content:
versions: 'auto'assumed each version owned a leading URL prefix. On a default Docusaurus site the current docs linked to the latest release's pages and versioned files linked to/versioned_docs/...404s. Auto mode now builds versions from the docs plugin config the way Docusaurus does (lastVersion,/docs/next/, versionpath,includeCurrentVersion,onlyIncludeVersions,disableVersioning) and scopes each version to/<routeBasePath>/<versionPath>/. Explicitversionsarrays behave as before, and a newroutePrefixfield lets them describe the same layout.i18n/directory, falling back to the source file, unless the locale setstranslate: false.docsDir,customLLMFiles, andincludeOrderonly got shape checks, so a bad value failed at build time and stopped every later version while the build reported success. They now get the top-level validation, and one version's runtime failure no longer stops the others.tests/test-versions-i18n.jscovers each case. Real Docusaurus 3.10.2 builds of a versioned site with anfrlocale, across four version configurations, have everyllms.txtlink resolve to a built page with matching content. The docs site'sllms.txtis unchanged; its generated.mdcopies differ only by the docs edits in this PR.