diff options
author | Alan Pearce | 2024-06-18 20:13:26 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-18 20:13:26 +0200 |
commit | b27c96688785372787eb5c3c71a32767fab71ac4 (patch) | |
tree | 2e39bc6cd94724953cf917c509fb141d39690cf1 /internal/builder/homepage.templ | |
parent | 1d247493e05cdc659e46cd3d8a01d5da1e893867 (diff) | |
download | website-b27c96688785372787eb5c3c71a32767fab71ac4.tar.lz website-b27c96688785372787eb5c3c71a32767fab71ac4.tar.zst website-b27c96688785372787eb5c3c71a32767fab71ac4.zip |
split content and sitemap code from builder
Diffstat (limited to 'internal/builder/homepage.templ')
-rw-r--r-- | internal/builder/homepage.templ | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/builder/homepage.templ b/internal/builder/homepage.templ index 9897b5d..1df401b 100644 --- a/internal/builder/homepage.templ +++ b/internal/builder/homepage.templ @@ -3,11 +3,12 @@ package builder 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 @@ func getContent(filename string) templ.Component { }) } -templ homepage(config config.Config, posts []Post) { +templ homepage(config config.Config, posts []content.Post) { @page(config, PageSettings{ Title: config.Title, TitleAttrs: templ.Attributes{ |