- WinterCMS-style shell: header with search and theme toggle, grouped sidebar, on-page TOC, pager, page actions, callouts, heading permalinks, footer and a 404 page - fenced code highlighted at build time by chroma/v2 into tok-* classes, with a copy button; no inline script, style or handler - vendored DM Sans/DM Mono fonts and Lucide icons with their licences - client-side search over search-index.json built with textContent only - summer docs:serve builds into a temp dir, serves on loopback by default, returns 404.html with status 404 and rebuilds on change
25 lines
486 B
HTML
25 lines
486 B
HTML
{{define "toc" -}}
|
|
{{- if .TOC}}
|
|
<aside class="toc" aria-label="On this page">
|
|
<p class="toc-title">On this page</p>
|
|
<ul>
|
|
{{- range .TOC}}
|
|
<li class="toc-h{{.Level}}"><a href="#{{.ID}}">{{.Text}}</a></li>
|
|
{{- end}}
|
|
</ul>
|
|
</aside>
|
|
{{- end}}
|
|
{{- end}}
|
|
{{define "toc-inline" -}}
|
|
{{- if .TOC}}
|
|
<details class="toc-inline">
|
|
<summary>On this page</summary>
|
|
<ul>
|
|
{{- range .TOC}}
|
|
<li class="toc-h{{.Level}}"><a href="#{{.ID}}">{{.Text}}</a></li>
|
|
{{- end}}
|
|
</ul>
|
|
</details>
|
|
{{- end}}
|
|
{{- end}}
|