Mkdocs
docforge.nav.mkdocs
MkDocs navigation emitter.
This module provides the MkDocsNavEmitter class, which converts a
ResolvedNav instance into the navigation structure required by the
MkDocs nav configuration.
Notes
- The emitted structure is a list of dictionaries, one per top-level nav
entry, matching the MkDocs
navYAML format.
Classes
MkDocsNavEmitter
Emit MkDocs navigation structures from resolved navigation data.
The emitter transforms a ResolvedNav object into the YAML-compatible
list structure expected by the MkDocs nav configuration field.
Functions
emit
Generate a navigation structure for mkdocs.yml.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nav |
ResolvedNav
|
Resolved navigation data describing documentation groups and their associated Markdown files. |
required |
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
list[dict[str, Any]]: A list of dictionaries representing the MkDocs navigation layout. Each dictionary maps a navigation label to a page or a list of pages. |