🛠 Building Docs
All documentation for khata-app is produced with doc-forge (installed into the khata venv from the local aetos source).
📋 What Gets Built
| Target | Command (from repo root) | Output |
|---|---|---|
| Lib (mkdocs) | doc-forge build --mkdocs --module <pkg> [--refresh] |
docs/lib/… + docs/mkdocs.lib.yml, site/lib/ |
| MCP bundles | doc-forge build --mcp --module <pkg> --out-dir docs\mcp\<pkg> |
docs/mcp/<pkg>/ (index.json, nav.json, modules/) |
| API (OpenAPI) | doc-forge build --api --openapi-spec <spec.json> |
docs/api/ + docs/mkdocs.api.yml |
| Wiki | doc-forge build --wiki --site-name "Khata App — Wiki" |
nav from docs/wiki/ + docs/mkdocs.wiki.yml |
| Serve | doc-forge serve |
local preview |
Builds must run from the repo root so Griffe discovers the packages.
📚 Lib Builds
docforge.nav.yml drives the nav groups:
🧠 MCP Bundles
Serve the API as machine-readable resources an MCP client can consume:
🌐 API Build
build --api reads JSON (not YAML). Convert openapi.yaml first:
📖 Wiki Build
The wiki is hand-authored under docs/wiki/; doc-forge only derives the nav:
Nav labels come from filenames (01_overview.md → Overview); tune docs/mkdocs.wiki.yml after generation for nicer titles.
⚠️ Known Gotchas
- pygments — 3.13 + pygments 2.20 crashes the highlighter; keep
pygments==2.19.2. - nav refresh — after changing
docforge.nav.yml, rebuild with--refreshor the nav won't regenerate. - unregistered links — MkDocs may warn about
ports/style relative links on the auto-generated index pages; cosmetic only.