forked from data.coop/website
Highlighting of current page stopped working, something with new URLS, this fix fixes it, but I don't know if it is the correct way to accomplish it.
This commit is contained in:
parent
f65718db01
commit
7b4e3ac695
|
@ -2,7 +2,9 @@
|
|||
<ol>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.nav }}
|
||||
<li><a href="{{ .URL }}"{{ if (eq $currentPage.URL .URL) }} class="active"{{ end }}>{{ .Name }}</a></li>
|
||||
{{ $atURL := absURL $currentPage.URL }}
|
||||
{{ $compURL := absURL .URL }}
|
||||
<li><a href="{{ .URL }}"{{ if (eq $atURL $compURL) }} class="active"{{ end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
|
||||
|
|
Loading…
Reference in a new issue