fix(docs): resolve relative markdown and wiki links across Fumadocs and GitHub wiki - #11834
Merged
diegosouzapw merged 1 commit intoAug 30, 2026
Conversation
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…nd GitHub wiki (diegosouzapw#11834) Resolução de links relativos entre Fumadocs e a wiki do GitHub, com dois arquivos de teste novos e bem focados (`docs-link-resolver.test.ts`, `sync-wiki.test.ts`). Validado no worktree combinado. Obrigado!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes broken relative cross-doc links across both dashboard docs (Fumadocs) and the GitHub wiki:
[AUTO-COMBO.md](../routing/AUTO-COMBO.md)previously retained the.mdextension in the URL, causing Next.js client-side 404s.src/lib/docsLinkResolver.tsresolves relative doc links to extensionless slug paths (/docs/routing/AUTO-COMBO), maps repo-level code links (../../src/...) to GitHub blob URLs, and normalizes links in i18n markdown rendering.scripts/docs/sync-wiki.mjsnow rewrites relative links in synced docs to flat GitHub wiki page names (e.g.Auto-Combo#14-factors), images to raw GitHub URLs, and repo code links to GitHub blob URLs.Changes
src/lib/docsLinkResolver.ts: Pure helper functionsresolveDocHrefandnormalizeDocsMarkdownLinkssrc/app/docs/[...slug]/page.tsx: MDX customacomponent wrappingresolveDocHref, plus link normalization intryI18nFallbackscripts/docs/sync-wiki.mjs: AddedrewriteWikiLinksand integrated intotoWikiContentandmain()tests/unit/docs-link-resolver.test.ts: 6 unit tests covering all doc-to-doc, hash, repo escaping, and external link casestests/unit/sync-wiki.test.ts: Added 5 unit tests for wiki link rewriting, image rewriting, anchor preservation, and localized wiki page prefixesValidation
npm run check:docs-all(passed: docs-sync, docs-counts, env-doc-sync, deprecated-versions, doc-links, fabricated-docs)node --import tsx/esm --test tests/unit/sync-wiki.test.ts(13/13 passing)node --import tsx/esm --test tests/unit/docs-link-resolver.test.ts(6/6 passing)npm run lint&npm run typecheck:core(clean)