Skip to content
HomePagesHomePages template kit

page

Declare one page: its menu/editor `label` (required on every page, single-page templates included), then either a `path` (`"/"` for the root page, else one lowercase-kebab segment such as `"/gallery"`) for a website page, or no path at all for a rendered class's pathless surface — the two forms return distinct types, and each `defineTemplate` branch accepts only its own.

Declare one page: its menu/editor label (required on every page, single-page templates included), then either a path ("/" for the root page, else one lowercase-kebab segment such as "/gallery") for a website page, or no path at all for a rendered class’s pathless surface — the two forms return distinct types, and each defineTemplate branch accepts only its own. The sections are in render order; a handle listed here and on another page is ONE shared instance rendered on both.

Import from @homepages/template-kit.

function page(label: string, path: string, sections: readonly SectionInstanceHandle[], opts?: PageOptions): RoutedPage
function page(label: string, sections: readonly SectionInstanceHandle[], opts?: PageOptions): UnroutedPage
Name Type Required Description
label string required
path string required
sections readonly SectionInstanceHandle[] required
opts PageOptions optional

RoutedPage