feat: Allow menu items to declare custom URLs
This commit is contained in:
parent
ad13520480
commit
d9715e0da9
1 changed files with 2 additions and 1 deletions
|
@ -3,9 +3,10 @@
|
||||||
<aside>
|
<aside>
|
||||||
<nav>
|
<nav>
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
|
{{ $link := default .URL (index .Params "link") }}
|
||||||
<a
|
<a
|
||||||
class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"
|
class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"
|
||||||
href="{{ .URL }}"
|
href="{{ $link }}"
|
||||||
>
|
>
|
||||||
{{- partial "fa.html" .Params.icon -}}
|
{{- partial "fa.html" .Params.icon -}}
|
||||||
{{ .Name }}
|
{{ .Name }}
|
||||||
|
|
Loading…
Reference in a new issue