From 2f7a0351f101684e7b0fdc1ec726499ae247f7a5 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..c05623c 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.RelPermalink) }} {{ $active = or $active (and (eq .Name "Tags") (eq $current.Section "tags")) }}
  • {{ end }} - \ No newline at end of file +