Versions in this module Expand all Collapse all v0 v0.2.0 Oct 5, 2024 v0.1.0 May 11, 2024 Changes in this version + var ErrNoTemplatePath = errors.New("need at least one template path") + var ErrTemplatePatternMatchesNoFiles = errors.New("pattern matches no files") + func LoggingContext(ctx context.Context, logger *slog.Logger) context.Context + func Render[SiteType Site, PageType Renderable](ctx context.Context, out io.Writer, site SiteType, page PageType) + type CSSEmbedder interface + EmbedCSS func(context.Context) template.CSS + type CSSLinker interface + LinkCSS func(context.Context) []string + type CachedSite struct + func NewCachedSite(templates fs.FS) *CachedSite + func (s *CachedSite) GetCachedTemplate(_ context.Context, key string) *template.Template + func (s *CachedSite) SetCachedTemplate(_ context.Context, key string, tmpl *template.Template) + func (s *CachedSite) TemplateDir(_ context.Context) fs.FS + type Component interface + Templates func(context.Context) []string + type ComponentUser interface + UseComponents func(context.Context) []Component + type FuncMapExtender interface + FuncMap func(context.Context) template.FuncMap + type JSEmbedder interface + EmbedJS func(context.Context) template.JS + type JSLinker interface + LinkJS func(context.Context) []string + type RenderData struct + EmbeddedCSS template.CSS + EmbeddedJS template.JS + LinkedCSS []string + LinkedJS []string + Page PageType + Site SiteType + type Renderable interface + ExecutedTemplate func(context.Context) string + Key func(context.Context) string + type ServerErrorPager interface + ServerErrorPage func(ctx context.Context) Renderable + type Site interface + TemplateDir func(ctx context.Context) fs.FS + type TemplateCacher interface + GetCachedTemplate func(ctx context.Context, key string) *template.Template + SetCachedTemplate func(ctx context.Context, key string, tmpl *template.Template)