feat(config): add global nav.toc setting with frontmatter override

- Add toc: bool to [nav] config section (default: false)
- Frontmatter toc: true/false overrides global config
- If frontmatter toc is not specified, falls back to config.nav.toc
- Enable nav.toc = true in docs/site.toml for global TOC
This commit is contained in:
Timothy DeHerrera
2026-02-01 09:42:00 -07:00
parent dcc98dccef
commit c8c2506e16
5 changed files with 23 additions and 10 deletions

View File

@@ -28,6 +28,9 @@ pub struct SiteConfig {
pub struct NavConfig {
/// Whether to display nested navigation (default: false).
pub nested: bool,
/// Enable table of contents (anchor nav) globally (default: false).
/// Can be overridden per-page via frontmatter toc field.
pub toc: bool,
}
/// Path configuration with sensible defaults.