Format templates
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
{{ $pagepath := strings.TrimPrefix $basepath $.RelPermalink }}
|
||||
{{ $menupath := strings.TrimPrefix $basepath .URL }}
|
||||
{{ $active := or (and (eq $menupath "/") (eq $pagepath "/")) (and (ne $menupath "/") (hasPrefix $pagepath $menupath)) }}
|
||||
|
||||
<a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} link-secondary {{ end }} {{ end }} nav-link" href="{{ .URL | safeURL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user