From 976732efd585b089ad214d7ec9aaf3008209a15b Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 19 Jan 2025 09:31:30 -0800 Subject: [PATCH] Activate home menu for root pages --- layouts/partials/paige/site-header.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/paige/site-header.html b/layouts/partials/paige/site-header.html index d1e6e218..71d63268 100644 --- a/layouts/partials/paige/site-header.html +++ b/layouts/partials/paige/site-header.html @@ -53,7 +53,7 @@ {{ range . }} {{ $menupath := strings.TrimPrefix $basepath .URL }} - {{ $home := and (eq $menupath "/") (eq $pagepath "/") }} + {{ $home := and (eq $menupath "/") (eq $page.Section "") }} {{ $menuprefix := and (ne $menupath "/") (hasPrefix $pagepath $menupath) }} {{ $sectionprefix := and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section)) }} @@ -115,7 +115,7 @@ {{ range $ordered }} {{ $menupath := strings.TrimPrefix $basepath .RelPermalink }} - {{ $home := and (eq $menupath "/") (eq $pagepath "/") }} + {{ $home := and (eq $menupath "/") (eq $page.Section "") }} {{ $menuprefix := and (ne $menupath "/") (hasPrefix $pagepath $menupath) }} {{ $sectionprefix := and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section)) }}