feat(nav): add anchor TOC in sidebar for toc-enabled pages

- Pass extracted anchors through template context
- Render anchor links under active page when page.toc is true
- Hierarchical indentation by heading level (h2-h6)
- CSS styling: smaller font, muted color, border-left indicator
- Add toc: true to templates.md as example
This commit is contained in:
Timothy DeHerrera
2026-02-01 09:37:01 -07:00
parent a59b8ff2ab
commit dcc98dccef
5 changed files with 76 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
title: Tera Templates
description: Customizable templates without recompilation
weight: 1
toc: true
---
sukr uses [Tera](https://tera.netlify.app/), a Jinja2-like templating engine. Templates are loaded at runtime, so you can modify them without recompiling sukr.