From 82e5f2ccabcf7e5bb282dcc18fd69df193ba4706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=BCtzner?= Date: Thu, 23 Feb 2023 20:01:33 +0000 Subject: [PATCH] fix: make tag links relative to the root of the page (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously when we clicked on a tag link, it would append the path to where we currently were, e.g. clicking "tag" on a post in the `/posts/` lists, would send us to `/posts/tags/tag` instead of `/tags/tag`. This fixes #7. Co-authored-by: Robert Lützner --- layouts/partials/metadata.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 21c26e0..c4e49c2 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -7,7 +7,7 @@ {{ with .Params.tags }} {{ range . }} -{{ $href := print (absURL "tags/") (urlize .) }} +{{ $href := print "/tags/" (urlize .) }} {{ . }} {{ end }} -{{ end }} \ No newline at end of file +{{ end }}