fix: permalink errors

This commit is contained in:
Henk Verlinde 2022-03-25 14:15:18 +01:00
parent 570fe3846c
commit 7e39fb69ab
2 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@
{{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}}
</ul>
</div>
@ -42,7 +42,7 @@
{{ else -}}
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}}
{{ end -}}
</ul>
@ -52,7 +52,7 @@
{{ else -}}
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}}
{{ end -}}
</ul>

View File

@ -18,14 +18,14 @@
{{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}}
</ul>
{{ end -}}
{{ else -}}
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}}
{{ end -}}
</ul>
@ -33,7 +33,7 @@
{{ else -}}
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}}
{{ end -}}
</ul>