Page template

Help people find a page: give it a category for `astryx search` and template listings, and flag a sparse starting shell as a scaffold.

Start from the generated page doc

integration add template writes a page doc by default. Replace its sample description, then add the page-only fields below.

templates/acme-dashboard.doc.mjs
javascript
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
export default {
type: 'page',
name: 'acme-dashboard',
displayName: 'Acme Analytics Dashboard',
description:
'A filterable account-health dashboard with headline metrics, trends, and a recent-activity table. Dashboard, reporting, analytics, or status overview.',
category: 'Dashboard - Analytics',
isReady: false,
};

Help people find the page

FieldTypeRequiredDescription
categoryTemplateCategorynoFunctional gallery category following a 'Group - Variant' convention (e.g. 'Dashboard - Analytics', 'Table - Basic', 'Form - Wizard'). The overview groups by the text before ' - '.
scaffoldbooleannoScaffolding-only template (e.g. blank page): available via the CLI but hidden from browsable galleries.

From TemplateDoc: astryx docs authoring template-doc

  • Set category to the most specific supported {Group} - {Variant} value. Its words become search terms for astryx search, and it appears in the JSON template list.
  • Set scaffold: true only for a deliberately sparse starting shell. The JSON template list reports it, so tools and galleries can tell a scaffold from a finished page.
  • Fields that only Astryx's own gallery reads, such as isHiddenFromOverview, have no effect on integration templates.