Commit 30aaaa7
fix(docs-site): add rehype plugin to prepend base URL to root-relative links
Markdown authors can now write links like `[guide](/docs/guides/middleware)`
and the rehypeBaseUrl plugin rewrites the href to `/cli-forge/docs/guides/middleware`
during rendering. This fixes 404s caused by missing the deploy base path.
The plugin runs after rehypeRaw in the unified pipeline so it catches links
in both markdown and raw HTML blocks. It skips absolute URLs and hrefs that
already have the base prefix.
Also reverts the comparison guide links from relative (`./middleware`) back
to absolute (`/docs/guides/middleware`) since the plugin handles them now.
This also fixes three pre-existing broken links in other guide pages
(configuration-files.md, generate-docs.md, middleware.md).
https://claude.ai/code/session_01TQedBZpMs8uNKo28i8M65J1 parent 984c382 commit 30aaaa7
File tree
2 files changed
+115
-79
lines changed- docs-site
- docs/guides
- server/utils
2 files changed
+115
-79
lines changed
0 commit comments