blob: 71887cdebd96497fb1cc34822dc43bc43d2a9414 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{{ define "main" }}
{{ range .Site.RegularPages }}
{{ .Content }}
{{ end }}
{{ end }}
{{ define "toc" }}
<ul id="toc" class="toc-list-h1">
{{ $headers := partial "funcs/toc_from_pages" .Site.RegularPages }}
{{ range $headers }}
<li>
<a href="#{{ .id }}" class="toc-h{{ .level }} toc-link" data-title="{{ .title }}">{{ .title }}</a>
{{if .sub }}
<ul class="toc-list-h2">
{{range .sub}}
<li><a href="#{{ .id }}" class="toc-h{{ .level }} toc-link" data-title="{{ .title }}">{{ .title }}</a></li>
{{end}}
</ul>
{{end}}
</li>
{{end}}
</ul>
{{ end }}
|