Static Generation

OTF Web can pre-render your routes to static HTML at build time. The output is plain strings — there is no server and no DOM in the render path — so it deploys to any static host.

Build

Shell
otfw build --ssg

Each route is rendered to an .html file under dist/, alongside the hashed JS and CSS bundles. On load, the same components take over the static markup.

Hydration adopts, never rebuilds

The static HTML is already the final markup. On first paint the client adopts those server-rendered nodes in place — wiring reactivity without re-rendering or reconciling a virtual tree. Full guide: Hydration.

What gets rendered

Every page.jsx/page.mdx route is pre-rendered with its layout chain. Components that only run in the browser (those touching window during render) are skipped gracefully and filled in on the client.

Each output .html file also gets a resolved <head> from the route's metadata exports (title, description, Open Graph, canonical, and related tags).