Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zwbetz-gh/vanilla-bootstrap-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/partials/nav.html5
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 }}