package templates import ( "context" "io" "time" "go.alanpearce.eu/website/internal/config" "go.alanpearce.eu/website/internal/content" ) func Unsafe(html string) templ.Component { return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) { _, err = io.WriteString(w, html) return }) } templ postDate(d time.Time) { } templ PostPage(config *config.Config, post content.Post) { @Page(config, PageSettings{ Title: post.Title, TitleAttrs: templ.Attributes{ "class": "p-author h-card", "rel": "author", }, BodyAttrs: templ.Attributes{ "class": "h-entry", }, Path: post.URL, }) {

{ post.Title }

@postDate(post.Date)

@Unsafe(post.Content)
Tags:
} }