Fix broken internal markdown links in docs renderer
Summary
Fix broken internal markdown links in the docs site.
Markdown links such as ./glossary.md were being rendered as raw relative hrefs, which caused broken URLs like:
/zh/docs/s00-architecture-overview/glossary.md
instead of routing to the app's actual doc pages.
Cause
The markdown renderer converted markdown content to HTML, but did not rewrite internal .md links to the site's route structure.
Fix
Update the docs renderer to map internal markdown links using the generated docs index:
- bridge docs ->
/{locale}/docs/{slug} - chapter docs ->
/{locale}/{version}
This keeps the markdown source unchanged while fixing navigation at render time.
Validation
- Reproduced the broken link locally
- Ran
npm run buildsuccessfully - Confirmed generated output no longer contains raw internal
.mdhrefs for site docs
@JGPliskin is attempting to deploy a commit to the crazyboym's projects Team on Vercel.
A member of the Team first needs to authorize it.
Thanks for the fix. I checked this against the current main.
The broken-link scenario described here does not appear to exist in the current version anymore: the current docs source does not contain the internal relative .md navigation links such as ./glossary.md, and the bridge-doc pages this PR targets are not part of current main.
The general idea of rewriting internal markdown links at render time could still be useful if we reintroduce those docs later, but this PR is now stale, conflicts with main, and includes a much broader set of changes than the link-renderer fix itself.
Closing this as no longer applicable to the current repository state.