Documentation
¶
Overview ¶
Package themecheck validates theme templates against the real site-ssr stack: it writes a theme file map to a scratch directory, parses it with the site-ssr pipeline, and smoke-renders every page with populated sample data. Boot, hot reload, install, and activation share this gate through the composed validator. A host that accepts themes from its users passes its own base theme explicitly so concurrent builds never swap globals.
Index ¶
- func HasTemplateFiles(files map[string]string) bool
- func NewValidator(base themegendomain.ThemeValidator, postTypeSlugs ...string) themegendomain.ThemeValidator
- func NewValidatorWithBase(base themegendomain.ThemeValidator, baseTheme *sitessr.BaseTheme, ...) themegendomain.ThemeValidator
- func ReadThemeTemplateSources(files fs.FS) string
- func SampleIndexData() sitessr.IndexData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasTemplateFiles ¶
HasTemplateFiles reports whether the theme overrides any page template. Stylesheet-only themes skip the render gate entirely.
func NewValidator ¶
func NewValidator(base themegendomain.ThemeValidator, postTypeSlugs ...string) themegendomain.ThemeValidator
NewValidator builds the composed validator: the domain file/CSS checks plus template parse and smoke render for the configured post-type slugs. The base validator defaults to the domain validator when nil.
func NewValidatorWithBase ¶
func NewValidatorWithBase(base themegendomain.ThemeValidator, baseTheme *sitessr.BaseTheme, postTypeSlugs ...string) themegendomain.ThemeValidator
NewValidatorWithBase builds the composed validator against an explicit base theme so a host that builds sets for many tenants never swaps globals. A nil base theme resolves through the package defaults.
func ReadThemeTemplateSources ¶
ReadThemeTemplateSources renders the edition's embedded page templates into the prompt source block. Files are marked so the model can map them to the documented file contract.
func SampleIndexData ¶
SampleIndexData returns the populated homepage dataset the render gate smoke-renders. Snapshots reuse it so cards show the same layout the gate checks.
Types ¶
This section is empty.