| | |
| | | <aside class="aside"> |
| | | {{- template "tree" (dict "page" . "section" .FirstSection) }} |
| | | {{- define "tree" }} |
| | | {{- $s := .section }} |
| | | {{- $p := .page }} |
| | | {{- $permalink := $p.RelPermalink }} |
| | | {{- $section := .section }} |
| | | {{- $page := .page }} |
| | | {{- $permalink := $page.RelPermalink }} |
| | | <section class="section"> |
| | | <h2 class="section_title{{ if eq $s.RelPermalink $permalink }} active{{ end }}"><a href="{{ $s.RelPermalink }}" class="group">{{ $s.Title }}</a></h2> |
| | | {{- $pages := $s.Pages }} |
| | | <h2 class="section_title{{ if eq $section.RelPermalink $permalink }} active{{ end }}"><a href="{{ $section.Permalink }}" class="group">{{ $section.Title }}</a></h2> |
| | | {{- $pages := $section.Pages }} |
| | | {{- with $pages }} |
| | | <section class="" id="docs-{{ anchorize $s.Title }}"> |
| | | <section class="" id="docs-{{ anchorize $section.Title }}"> |
| | | {{- range . }} |
| | | {{- if .IsPage }} |
| | | <h3 class="section_link{{ if eq .RelPermalink $permalink }} active{{ end }}"><a id="docs-{{ anchorize .Title }}" href="{{ .RelPermalink }}">{{ .Title }}</a></h3> |
| | | <h3 class="section_link{{ if eq .RelPermalink $permalink }} active{{ end }}"><a id="docs-{{ anchorize .Title }}" href="{{ .Permalink }}">{{ .Title }}</a></h3> |
| | | {{- .TableOfContents }} |
| | | {{- else }} |
| | | {{- template "tree" (dict "page" $p "section" .) }} |
| | | {{- template "tree" (dict "page" $page "section" .) }} |
| | | {{- end }} |
| | | {{- end }} |
| | | </section> |