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
This commit is contained in:
33
docs/wiki/04_iterative_workflow.md
Normal file
33
docs/wiki/04_iterative_workflow.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Iterative Workflow
|
||||
|
||||
A docs build runs through the CLI in a single pass.
|
||||
|
||||
## Build commands
|
||||
|
||||
```bash
|
||||
# Library reference only
|
||||
doc-forge build --mkdocs --module docforge
|
||||
|
||||
# Wik + library combined (single MkDocs build)
|
||||
doc-forge build --wiki --mkdocs --module docforge
|
||||
|
||||
# Wiki only — no module required
|
||||
doc-forge build --wiki --site-name docforge
|
||||
```
|
||||
|
||||
## What a combined build does
|
||||
|
||||
1. Validates the requested modes (`--mkdocs`, `--api`, `--wiki`, `--mcp`).
|
||||
2. Generates library sources under `docs/lib/**` with `MkDocsRenderer`.
|
||||
3. Generates API sources under `docs/api/**` when `--api` is given.
|
||||
4. Derives wiki navigation from `docs/wiki/**`.
|
||||
5. Writes `mkdocs.yml` with merged navigation — wiki first, generated groups
|
||||
appended, and the wiki `Home` replacing any spec `Home` entry.
|
||||
6. Runs `mkdocs build` once and emits the site.
|
||||
|
||||
## Explore the site
|
||||
|
||||
```bash
|
||||
doc-forge build --wiki --mkdocs --module docforge
|
||||
doc-forge serve --mkdocs-yml mkdocs.yml
|
||||
```
|
||||
Reference in New Issue
Block a user