From 69551a5fbda18f436dcc119b966a437897918d56 Mon Sep 17 00:00:00 2001 From: HugoPoi Date: Wed, 30 Nov 2022 11:35:45 +0100 Subject: [PATCH] feat: can add blog post in nav --- layouts/partials/nav.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 760b79e..f39c6ab 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -11,8 +11,7 @@ {{ range .Site.Menus.nav }}
  • {{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }} - {{ $active = or $active (eq .Name $current.Title) }} - {{ $active = or $active (and (eq .Name "Blog") (eq $current.Section "post")) }} + {{ $active = or $active (eq .URL $current.URL) }} {{ $active = or $active (and (eq .Name "Tags") (eq $current.Section "tags")) }}
  • {{ end }} - \ No newline at end of file +