make posts a bit more abstract
1 file changed, 5 insertions(+), 1 deletion(-)
changed files
M internal/builder/template.go → internal/builder/template.go
@@ -86,6 +86,10 @@ Entries: make([]*atom.FeedEntry, len(posts)), } for i, post := range posts { + html, err := post.RenderString() + if err != nil { + return nil, errors.WithMessage(err, "could not render post") + } feed.Entries[i] = &atom.FeedEntry{ Title: post.Title, Link: atom.MakeLink(config.BaseURL.JoinPath(post.URL)),@@ -94,7 +98,7 @@ Updated: post.Date.UTC(), Summary: post.Description, Author: config.Title, Content: atom.FeedContent{ - Content: post.Content, + Content: html, Type: "html", }, }