Skip to content
HomePagesHomePages template kit

defineTemplate

Validate and freeze an authored template.

Validate and freeze an authored template. The manifest is parsed by TemplateManifest here rather than at any call site, so defaults and key order are applied exactly once and the serialized composition is byte-stable. scope travels beside the manifest and never enters it.

Import from @homepages/template-kit.

function defineTemplate(input: DefineTemplateInput): AuthoredTemplate
Name Type Required Description
input DefineTemplateInput required

AuthoredTemplate

  • when a composition rule is violated (see TemplateManifest — page rules, format floors, preset-tag geometry, the website singleton, the canvas partition), or when the scope names no org, names one twice, or names one that is not a UUID.