feat: can add blog post in nav
This commit is contained in:
parent
13d9a893d5
commit
69551a5fbd
|
@ -11,8 +11,7 @@
|
||||||
{{ range .Site.Menus.nav }}
|
{{ range .Site.Menus.nav }}
|
||||||
<li class="pattern">
|
<li class="pattern">
|
||||||
{{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }}
|
{{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }}
|
||||||
{{ $active = or $active (eq .Name $current.Title) }}
|
{{ $active = or $active (eq .URL $current.URL) }}
|
||||||
{{ $active = or $active (and (eq .Name "Blog") (eq $current.Section "post")) }}
|
|
||||||
{{ $active = or $active (and (eq .Name "Tags") (eq $current.Section "tags")) }}
|
{{ $active = or $active (and (eq .Name "Tags") (eq $current.Section "tags")) }}
|
||||||
<a href="{{ .URL }}" {{ if $active }}aria-current="page"{{ end }}>
|
<a href="{{ .URL }}" {{ if $active }}aria-current="page"{{ end }}>
|
||||||
<svg class="bookmark-icon" aria-hidden="true" focusable="false" viewBox="0 0 40 50">
|
<svg class="bookmark-icon" aria-hidden="true" focusable="false" viewBox="0 0 40 50">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user