Site building

Menus, site, and theme

Navigation menus, site-wide settings, and theme tokens rendered as CSS variables.


  • menus: documents with a unique name and items ([{ label, href, children? }]). Components read them at /menus/<name>.

  • site (global): title, description, logo, favicon, and locale, available at /site.

  • theme (global): tokens, validated by the host's site.themeSchema.

Styling in three layers

  • Component props first: tones, sizes, spacing, columns per breakpoint, alignment. There are no class or style props; each component's Tailwind classes are built in code.

  • Theme tokens next. The reference app maps tokens such as primary, radius, and fontHeading to CSS variables like --primary.

  • A page's or layout's css last, scoped to its elements. @import and external url() are removed.

PATCH /api/_globals/theme
{ "data": { "tokens": { "primary": "oklch(0.55 0.2 260)", "radius": "0.5rem" } } }