composeSections
Build one typed handle per composed section instance.
Build one typed handle per composed section instance. The object key is the
section key (override with section: when composing a section twice), and
object insertion order is composition order.
That section key IS the section’s folder name on disk, verbatim and kebab
("price-range", not a camelCased spelling of it), because every stage resolves
a composed entry by matching it against the discovered section folders. An entry
matching no folder is refused
everywhere it is read: check reports it as an unknown section, and the dev
server refuses the page naming the key. The reverse is not an error — a section
folder nothing composes is ordinary work in progress.
Import from @homepages/template-kit.
Signature
Section titled “Signature”function composeSections<T extends { [K in keyof T]: ComposeEntry; }>(entries: T): { [K in keyof T]: SectionInstanceHandle<T[K]["schema"]>; }Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
entries |
T |
required |
Returns
Section titled “Returns”{ [K in keyof T]: SectionInstanceHandle<T[K]["schema"]>; }
See also
Section titled “See also”canvascomposeCanvasescomposePagesdefineTemplateorgsForScopepagevisibilityForScopeAuthoredCanvasAuthoredTemplateComposeEntryDefineTemplateCommonPageOptionsRoutedPageSectionInstanceHandleSiteInstanceSlotRefUnroutedPageAuthoredPageComposedCanvasComposedCanvasesComposedPageComposedPagesDefineTemplateInputTemplateScope