Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clear
oryarn clear
command. - I have tried
rm -rf node_modules yarn.lock package-lock.json
and re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
For the explanation, it's sufficient to assume that there's only one document, index.mdx
, located under /docs
. I have versioned this document for versions 1.0.0
and 2.0.0
. Version 2.0.0
represents the current
version. Additionally, /docs
also represents the next
version. My documentation is also internationalized into de
, alongside the default en
.
With this setup, the document should be accessible in English at /1.0.0
, /
, and /next
, and in German at /de/1.0.0
, /de
, and /de/next
. All these paths correctly serve the corresponding document after running npm run build and npm run serve, except for /de/1.0.0
, which returns a 404 error.
While searching for the cause of this issue, I noticed the following:
-
If I add another versioned and internationalized document
intro.mdx
to/docs
, it is correctly served under/de/1.0.0/intro
after runningnpm run build
andnpm run serve
. -
When I run
npm run start -- --locale de
, the document is correctly served on every path. -
If I rename the version
1.0.0
toabc
, the document is correctly served on all paths afternpm run build
andnpm run serve
. -
If I add another versioned and internationalized document
index.mdx
in/docs/tutorial
, this one is also not accessible under/de/1.0.0/tutorial
afternpm run build
andnpm run serve
.
Reproducible demo
https://github.com/LuggaLugga/docusaurus-bug-demo
Steps to reproduce
- Build the demo with
npm run build
- Run the demo with
npm run serve
- Navigate to http://localhost:3000/de/1.0.0
Expected behavior
I expect the document from i18n/de/docusaurus-plugin-content-docs/version-1.0.0/index.mdx
to be rendered.
Actual behavior
The document from i18n/de/docusaurus-plugin-content-docs/version-1.0.0/index.mdx
is not accessible according to the 404 error code.
Your environment
- Public source code: https://github.com/LuggaLugga/docusaurus-bug-demo
- Public site URL: none
- Docusaurus version used: 3.7.0
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Safari 18.04, Node 22.14.0
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS Sequoia 15.4
Self-service
- I'd be willing to fix this bug myself.