package templates import ( "go.alanpearce.eu/homestead/internal/config" "go.alanpearce.eu/homestead/internal/content" ) type HomepageVars struct { Email string Me []config.MenuItem Posts []*content.Post } templ Homepage(site SiteSettings, vars HomepageVars, content templ.Component) { @Layout(site, PageSettings{ Title: site.Title, TitleAttrs: templ.Attributes{ "class": "p-name u-url", }, Path: "/", BodyAttrs: templ.Attributes{ "class": "h-card", }, }) {
@content

Latest Posts

@list(vars.Posts[0:5])

Elsewhere on the Internet

} }