This commit is contained in:
Vincent Fiduccia
2018-04-27 01:41:46 -07:00
parent 7060477f28
commit 16feeacbf6
5 changed files with 58 additions and 68 deletions
+3 -2
View File
@@ -33,11 +33,12 @@
{{ $topLevel := .Scratch.Get "topLevel"}}
{{ if $topLevel }}
{{ range $topLevel.Sections }}
{{ if .IsAncestor $.CurrentSection }}
{{ $isCurrent := .IsAncestor $.CurrentSection }}
{{ if $isCurrent }}
{{ $.Scratch.Set "secondLevel" . }}
{{ end }}
<li><a href="{{ .Permalink }}" class="">{{ .Title }}</a></li>
<li class="{{if $isCurrent}}active{{end}}"><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>