diff options
-rw-r--r-- | layouts/partials/nav.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 95699c8..675b466 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -6,7 +6,10 @@ {{ $active := "" }} {{ if eq $showActiveNav true }} {{ $isMenu := or ($currentPage.IsMenuCurrent "nav" .) ($currentPage.HasMenuCurrent "nav" .) }} - {{ if or $isMenu (eq $currentPage.Title .Name) }} + {{ $isMenu = or $isMenu (eq $currentPage.Title .Name) }} + {{ $isMenu = or $isMenu (and (eq .Name "Blog") (eq $currentPage.Section "post")) }} + {{ $isMenu = or $isMenu (and (eq .Name "Tags") (eq $currentPage.Section "tags")) }} + {{ if $isMenu }} {{ $active = "nav-link-active" }} {{ end }} {{ end }} |