themecheck

package
v1.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasTemplateFiles

func HasTemplateFiles(files map[string]string) bool

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

func ReadThemeTemplateSources(files fs.FS) string

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

func SampleIndexData() sitessr.IndexData

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL