fix(mkdocs): rebase cross-kind wiki links under directory URLs
All checks were successful
continuous-integration/drone/tag Build is passing

Wiki pages linking to a sibling kind (for example ../lib/...) were emitted verbatim by MkDocs and, with use_directory_urls, resolved into a non-existent <kind>/<kind>/ path. Add a docforge-linkfix plugin (doc-forge 0.0.8) that rebases those links to the repository root.
This commit is contained in:
2026-10-17 17:22:23 +05:30
parent c9e6945c26
commit 09118115a4
7 changed files with 167 additions and 3 deletions

View File

@@ -55,5 +55,20 @@ Commit `docs/mkdocs.{kind}.yml` so served docs are reproducible from source.
---
## 🔗 Cross-kind links
Kinds are separate MkDocs sites served side by side under `/<repo>/<kind>/`,
so a wiki page may link to the library reference with a source-relative path
such as `../lib/13_library_registry/`. MkDocs only rewrites links that point
inside `docs_dir`; anything reaching a sibling kind is emitted verbatim and,
under `use_directory_urls`, resolves into `<kind>/<kind>/` and breaks.
The `docforge-linkfix` plugin (part of doc-forge, enabled in the wiki
template) fixes this at render time: it rewrites `../lib/`, `../api/`, and
`../wiki/` links to climb to the repository root, so they resolve correctly
however deeply the page is nested.
---
## Related
- [04 – MCP Guide](04_mcp_guide.md)