refactor: make templates take a more specific struct
1 file changed, 2 insertions(+), 3 deletions(-)
changed files
M templates/post.templ → templates/post.templ
@@ -5,7 +5,6 @@ "context" "io" "time" - "go.alanpearce.eu/homestead/internal/config" "go.alanpearce.eu/homestead/internal/content" )@@ -22,8 +21,8 @@ { d.Format("2006-01-02") } </time> } -templ PostPage(config *config.Config, post *content.Post) { - @Layout(config, PageSettings{ +templ PostPage(site SiteSettings, post *content.Post) { + @Layout(site, PageSettings{ Title: post.Title, TitleAttrs: templ.Attributes{ "class": "p-author h-card",