Files
doc-forge/docforge/nav/wiki.pyi
Vishesh 'ironeagle' Bangotra 8c6c46caf2 feat: add wiki build kind with file-structure-derived navigation
- add build_wiki_nav deriving MkDocs nav from docs/wiki file structure
  (index.md -> Home, numeric prefixes stripped and title-cased, nested
  dirs become groups, natural ordering)
- add --wiki / --wiki-dir to build; wiki-only builds need no --module
- merge wiki nav before generated lib/api nav; wiki Home replaces the
  nav spec Home entry
- add mkdocs.wiki.yml template fragment and nav/cli tests
- dogfood doc-forge's own docs/wiki and regenerate site output
2026-09-11 23:38:23 +05:30

16 lines
373 B
Python

from pathlib import Path
from typing import Any
def build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]:
"""
Derive an MkDocs navigation block from a wiki directory.
Returns:
Wiki navigation entries compatible with the MkDocs
`nav` configuration.
Raises:
FileNotFoundError: if the wiki directory does not exist
"""
...