feat: match active class docs menu on identifier

This commit is contained in:
Henk Verlinde 2021-02-12 09:19:50 +01:00
parent 4048e98259
commit 7384cfe8f1
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@
<ul class="list-unstyled">
{{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
{{- $active = or $active (eq .Name $currentPage.Title) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | absURL }}">{{ .Name }}</a></li>
{{ end -}}
</ul>