blob: 476b1fa0fdb67062b38b2db20c473dfb8ba64425 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{{ define "main" }}
{{ range .Site.RegularPages }}
{{ .Content }}
{{ end }}
{{ end }}
{{ define "toc" }}
<ul id="toc" class="toc-list-h1">
{{ $headers := slice }}
{{ with .Site.RegularPages }}
{{ $headers = partial "funcs/toc_from_pages" . }}
{{ end }}
{{ 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 }}
|