# Marketing site Static marketing site for the demo, rendered by `atlas9 gensite`. Output is a self-contained static tree — deploy it to any dumb static host. In production it is deliberately **not** served by the app process: the marketing site must stay up even when the app is down. ## Build ``` atlas9 gensite --src apps/demo/site --out apps/demo/site/dist ``` Then open `dist/index.html` with any static file server. ## Local preview via the app `atlas9 run` builds this directory into `dist/` on startup and points the app at it (via `ATLAS9_SITE_DIR`), so the site is served at the root with no extra config — visit `http://localhost:8010/`. This is a dev-only preview: the app's own routes (`/login`, `/dashboard`, …) still take precedence, and production uses neither the runner nor the env var, so the app never serves the site there. Source edits are picked up on the next `atlas9 run`. To serve the site from the app outside the dev runner, set `[site] dir` in `config.toml` instead. ## Layout - `base.html` — the page skeleton; defines `base`, pulls in `header`/`footer`. - `partials/` — shared components, one `{{define "name"}}` per file. Edit the header/footer here **once**; every page picks up the change on the next build. - `pages/` — one file per output page. Each defines `title` and `content`. `api.html` is **generated** by `go run ./tools` (api_gen's "docs" format) from the API package — do not hand-edit it; regenerate instead. - `static/` — copied verbatim to `dist/static/`. `site.css` holds the design tokens and component classes. ## Conventions (read before editing) These keep pages consistent across separate editing sessions: - **Use the tokens and component classes in `static/site.css`.** Do not invent new colors, spacing values, or one-off classes. Compose from `.btn`, `.hero`, `.feature`, `.tier`, etc., and the `--color-*` / `--space-*` variables. - **Shared chrome lives in `partials/`.** Never hand-copy the header or footer into a page. - **Add a page** by creating `pages/.html` defining `title` and `content`; it inherits the layout automatically. Link to it as `/.html`. - **Forms** post to the atlas9 API as anonymous-principal writes and must degrade gracefully if the API is unreachable (see the beta form in `pages/index.html`). The page stays static regardless. - **Brand tokens** (`--color-accent`, `--font-sans`, `--radius`) are the one thing meant to stay visually in sync with the product UI. Everything else is marketing-only and independent of the app frontend.