commit 82e5f2ccabcf7e5bb282dcc18fd69df193ba4706
parent 473add39bd453365ad33bd4f28d9fcfd6786eca9
Author: Robert Lützner <robert.luetzner@pm.me>
Date: Thu, 23 Feb 2023 20:01:33 +0000
fix: make tag links relative to the root of the page (#8)
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 <robert.luetzner@iternity.com>
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
@@ -7,7 +7,7 @@
{{ with .Params.tags }}
<i data-feather="tag"></i>
{{ range . }}
-{{ $href := print (absURL "tags/") (urlize .) }}
+{{ $href := print "/tags/" (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ end }}
-{{ end }}
-\ No newline at end of file
+{{ end }}