split content and sitemap code from builder
1 file changed, 3 insertions(+), 2 deletions(-)
changed files
M internal/builder/homepage.templ → internal/builder/homepage.templ
@@ -3,11 +3,12 @@ import ( "website/internal/config" "path" + "website/internal/content" ) func getContent(filename string) templ.Component { return templ.ComponentFunc(func(ctx context.Context, w io.Writer) error { - _, index, err := getPost(path.Join("content", filename)) + _, index, err := content.GetPost(path.Join("content", filename)) if err != nil { return err }@@ -17,7 +18,7 @@ return err }) } -templ homepage(config config.Config, posts []Post) { +templ homepage(config config.Config, posts []content.Post) { @page(config, PageSettings{ Title: config.Title, TitleAttrs: templ.Attributes{