moonming commented on PR #2078: URL: https://github.com/apache/apisix-website/pull/2078#issuecomment-5089426531
All four correct again — thanks for digging into the Docusaurus internals. Addressed in f1b2399c4. **Version routing.** You're right, and my fix was worse than the problem: `versions.json` holds release names only (`current` is injected separately by `includeCurrentVersion`), so `all.slice(1)` dropped 3.17, promoted 3.16 into the version-less path with older content, and stopped building both `3.16/` and `next/`. I confirmed this against the beta.6 sources — `getDefaultLastVersionName` picks the first non-`current` entry, and `isLast` is what gets the empty path. Every version now keeps building; the newest release just gets an explicit `path` so it stops owning the version-less URLs. Sub-projects are covered too — as you noted, the old helper returned `undefined` for all six, so their routes were never touched. One consequence worth calling out explicitly: this publishes a **new** URL set — `/docs/apisix/3.17/` and the equivalent per sub-project — that the live site does not have today. Nothing is removed; the newest release simply becomes addressable by version like every other one. If you'd rather it not be reachable at all, `banner`/`noIndex` on that version entry is the lever, but I'd argue an addressable current release is the more useful default. **Fallback edit links.** Fixed properly this time. `DocEntry` now carries `sourceLocale` — the locale of the file the page was actually rendered from — and the edit URL is built from that rather than the rendered locale. Your two examples now resolve: `/zh/docs/apisix/aws/` → `release/3.17/docs/en/latest/aws.md`, `/zh/docs/helm-chart/apisix/` → `master/docs/en/latest/apisix.md`, while a genuinely translated page like `/zh/docs/apisix/plugins/cors/` still points at `docs/zh/latest/`. **Sub-project version picker.** Added to the generic routes; all six now link back to `next/`. **Twin index duplication.** Fixed — the index is keyed by URL, so the translated entry replaces the fallback instead of appending, and the parity check now reads the links actually emitted into `llms.txt` rather than a Set derived from the write log. I also added an assertion that fails the build on any duplicate entry, which immediately earned its keep: it caught a second bug where `/docs/general/blog/` was filed under both the docs and blog sections because grouping used a substring test. Files and index entries are now 1:1 at 1,186. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
