From 4cee39542d5c5220b6e2106502a42db6610d8f79 Mon Sep 17 00:00:00 2001 From: razonyang Date: Sat, 9 Dec 2023 01:27:58 +0800 Subject: [PATCH] fix: correct URL parsing --- layouts/partials/bootstrap/functions/url.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/bootstrap/functions/url.html b/layouts/partials/bootstrap/functions/url.html index 9de59b3..4d505a0 100644 --- a/layouts/partials/bootstrap/functions/url.html +++ b/layouts/partials/bootstrap/functions/url.html @@ -8,8 +8,8 @@ {{- else }} {{- if hasPrefix $url "/" }} {{- $url = relURL $url }} - {{- else }} - {{- $url = printf "%s%s" .Page.RelPermalink $url }} + {{- else if not (hasPrefix $url "#") }} + {{- $url = printf "%s%s" .Page.Permalink $url }} {{- end }} {{- end }} {{- end }}