feat(content): add filesystem-driven nav discovery

Add NavItem struct and discover_nav() function to scan content
directory and automatically build navigation from:
- Top-level .md files (pages)
- Directories with _index.md (sections)

Navigation is sorted by frontmatter weight, then alphabetically.
Custom nav_label field allows overriding title in nav menu.

Includes 5 unit tests covering page/section discovery, weight
ordering, and nav_label support.
This commit is contained in:
Timothy DeHerrera
2026-01-31 13:52:21 -07:00
parent 88b53b7a7b
commit b978edf4f2
3 changed files with 223 additions and 1 deletions

View File

@@ -42,3 +42,6 @@ mermaid-rs-renderer = { version = "0.1", default-features = false }
# Patch dagre_rust to fix unwrap on None bug
[patch.crates-io]
dagre_rust = { path = "patches/dagre_rust" }
[dev-dependencies]
tempfile = "3.24.0"