learn-claude-code icon indicating copy to clipboard operation
learn-claude-code copied to clipboard

Fix broken internal markdown links in docs renderer

Open JGPliskin opened this issue 7 months ago • 1 comments

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 build successfully
  • Confirmed generated output no longer contains raw internal .md hrefs for site docs

JGPliskin avatar Apr 08 '26 16:04 JGPliskin

@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.

vercel[bot] avatar Apr 08 '26 16:04 vercel[bot]

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.

Bill-Billion avatar Jun 26 '26 20:06 Bill-Billion