- 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
16 lines
373 B
Python
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
|
|
"""
|
|
...
|