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.
Signature
Section titled “Signature”function defineTemplate(input: DefineTemplateInput): AuthoredTemplateParameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
input |
DefineTemplateInput |
required |
Returns
Section titled “Returns”AuthoredTemplate
Constraints
Section titled “Constraints”- 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.
See also
Section titled “See also”canvascomposeCanvasescomposePagescomposeSectionsorgsForScopepagevisibilityForScopeAuthoredCanvasAuthoredTemplateComposeEntryDefineTemplateCommonPageOptionsRoutedPageSectionInstanceHandleSiteInstanceSlotRefUnroutedPageAuthoredPageComposedCanvasComposedCanvasesComposedPageComposedPagesDefineTemplateInputTemplateScope