Static pages

Static pages engine (HTML/HBS)

Author SEO-friendly pages with Handlebars, recursive partials, and zero build steps. Routes are auto-wired from files under src/templates/.

Why this feature

SSR frameworks (Next/Nuxt) are overkill for SEO‑friendly content. Keep it simple: static HTML/HBS renders fast, builds are instant, and DX stays smooth.

Common use cases
  • Single codebase for your app and SEO pages—no separate site.
  • AI Agents natively author HTML + Handlebars partials.
  • Docs, landing, changelog, blog‑style content without JS stacks.
Value

Spend less time fixing TypeScript or hydration errors—agents and humans focus on content. Auto‑wired routes, reusable partials, and HOT deploys with Copy‑to‑Backend.

Overview

  • Serve .html as-is and .hbs via Handlebars rendering.
  • Recursive partials from src/templates/partials/ (subdirectories supported).
  • Auto-wired routes: file path ↔ route path (e.g., src/templates/docs/pricing.html/docs/pricing).
  • Reusable head block via {{> head}} partial with SEO/meta props; supports runtime head injection via INJECT_HEAD_TAGS.

Quickstart

  1. Add a page: create src/templates/your-page.hbs.
  2. Use partials from src/templates/partials/ with {{> your-partial}}.
  3. Visit /your-page. For nested paths, mirror folders under src/templates/.

Handlebars specifics

  • Both .html and .hbs supported; helpers include abs_url.
  • Head partial: use {{> head title=... description=... }}; SEO images/scripts supported.
  • Dynamic data may be injected by the route handler; keep pages mostly static for simplicity.

Deep dive: docs/static-pages/handlebars-support.md

HOT deploy templates

Deploy updated templates to a running backend in seconds using the Copy-to-Backend module.

npm run ci:copy-templates
  • Uploads are persisted and restored on startup.
  • Ideal for iterating on landing pages, pricing, docs, and changelog content.
  • See: Copy-to-Backend guide and the agent playbook at docs/static-pages/.agent.md.

Examples