all repos — homestead @ ee73e935234cb2726946c6312acea41765987126

Code for my website

fix tags links

Alan Pearce
commit

ee73e935234cb2726946c6312acea41765987126

parent

38e68f53fd96802bde794722869753a6487c0539

2 files changed, 3 insertions(+), 3 deletions(-)

jump to
M internal/builder/builder.gointernal/builder/builder.go
@@ -91,10 +91,10 @@ matchingPosts = append(matchingPosts, post)
} } 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 }
M templates/tags.templtemplates/tags.templ
@@ -3,7 +3,7 @@
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) {