diff options
author | Alan Pearce | 2025-01-26 14:38:13 +0100 |
---|---|---|
committer | Alan Pearce | 2025-01-26 14:38:13 +0100 |
commit | abea3d93a675f0689d4a8833825546d7ac01942a (patch) | |
tree | f175b00bd57507a7b7ca7f6e7018945d4124e01a | |
parent | 88932b8dc1d2a73195dcb1a9c4b82e15acd908c4 (diff) | |
download | website-abea3d93a675f0689d4a8833825546d7ac01942a.tar.lz website-abea3d93a675f0689d4a8833825546d7ac01942a.tar.zst website-abea3d93a675f0689d4a8833825546d7ac01942a.zip |
-rw-r--r-- | internal/builder/builder.go | 4 | ||||
-rw-r--r-- | templates/tags.templ | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/builder/builder.go b/internal/builder/builder.go index df66f87..90df0f1 100644 --- a/internal/builder/builder.go +++ b/internal/builder/builder.go @@ -91,10 +91,10 @@ func build(ioConfig *IOConfig, config *config.Config, log *log.Logger) (*Result, } } log.Debug("rendering tags page", "tag", tag) - url := "/tags/" + tag + url := path.Join("tags", tag) + "/" if err := storage.RenderToFile( templates.TagPage(config, tag, matchingPosts, url), - path.Join("tags", tag)+"/", + url, ); err != nil { return nil, err } diff --git a/templates/tags.templ b/templates/tags.templ index c872a0d..254f3d5 100644 --- a/templates/tags.templ +++ b/templates/tags.templ @@ -3,7 +3,7 @@ package templates import "go.alanpearce.eu/website/internal/config" templ tagLink(tag string, attrs templ.Attributes) { - <a { attrs... } href={ templ.SafeURL("/tags/" + tag) }>#{ tag }</a> + <a { attrs... } href={ templ.SafeURL("/tags/" + tag + "/") }>#{ tag }</a> } templ TagsPage(config *config.Config, title string, tags []string, path string) { |