header: fix trailing slash '/' in menu URL

closes #122
This commit is contained in:
Aditya Telange 2020-12-11 00:18:08 +05:30
parent 7352aedb34
commit 9c09564590
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -112,7 +112,7 @@
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
{{- $page_url:= $currentPage.Permalink | absLangURL }}
<li>
<a href="{{ $menu_item_url }}">
<a href="{{ .URL | absLangURL }}">
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
{{ .Name }}
</span>