refactor: make templates take a more specific struct
1 file changed, 3 insertions(+), 6 deletions(-)
changed files
M templates/page.templ → templates/page.templ
@@ -1,12 +1,9 @@ package templates -import ( - "go.alanpearce.eu/homestead/internal/config" - "go.alanpearce.eu/homestead/internal/content" -) +import "go.alanpearce.eu/homestead/internal/content" -templ Page(config *config.Config, page *content.Post) { - @Layout(config, PageSettings{ +templ Page(site SiteSettings, page *content.Post) { + @Layout(site, PageSettings{ Title: page.Title, TitleAttrs: templ.Attributes{ "class": "h-card",