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:
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user