From cee4e94255a3c1cd253e60057d06a5768e728be6 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 19 Mar 2023 20:44:18 -0700 Subject: [PATCH] Move invariant out of loop --- layouts/partials/paige/menu.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/partials/paige/menu.html b/layouts/partials/paige/menu.html index d9cc5917..fab3903e 100644 --- a/layouts/partials/paige/menu.html +++ b/layouts/partials/paige/menu.html @@ -9,6 +9,8 @@ {{ $basepath = "" }} {{ end }} +{{ $pagepath := strings.TrimPrefix $basepath $page.RelPermalink }} + {{ with $page.Param "paige.menu.style" }} {{ if eq . "links" }} {{ $links = true }} @@ -28,7 +30,6 @@