docs: document navigation, TOC, and template context

Add comprehensive documentation for recently implemented features:
- [nav] config section (nested, toc toggles)
- Complete frontmatter fields reference (10 fields)
- Hierarchical navigation behavior with ASCII diagram
- Template context: nested_nav, anchors array, page.toc
- Nav item structure including children for nested menus
This commit is contained in:
Timothy DeHerrera
2026-02-01 11:00:20 -07:00
parent 3d5682c59f
commit f38303b7e0
3 changed files with 82 additions and 14 deletions

View File

@@ -58,6 +58,22 @@ weight: 10 # Appears before items with weight > 10
---
```
### Hierarchical Navigation
When `nav.nested = true` in your config, section children appear as nested sub-items:
```text
Features ← Section link
├─ Templates ← Child page
├─ Sections ← Child page
└─ Highlighting ← Child page
Getting Started ← Top-level page
```
Child pages inherit their parent section's position in the nav tree. Within a section, children sort by weight then alphabetically.
Without nested navigation (the default), only top-level items appear in the nav.
## URL Examples
| Source Path | Output Path | URL |