--- name: marketing-site-engineering description: "Engineering skill: Server-rendered marketing site — how to build and ship a marketing site with Astro, TypeScript, CSS with custom properties, Vitest. Use when writing, reviewing, testing or releasing code in this stack, and when turning a Celestial design or experience skill into code." type: engineering stack: marketing-site core: "1.0" checked: 2026-10-25 --- # Server-rendered marketing site Content pages that load fast on a slow phone: rendered on the server, almost no JavaScript, and strict performance gates. For landing pages, docs and blogs. Pages are rendered to HTML at build or request time; interactive islands load only where needed. Design-skill tokens become plain CSS variables. ## Stack - **Language:** TypeScript ^5.6 — Typed content collections and components. - **Framework:** Astro ^5 — HTML-first rendering with opt-in interactive islands. - **Styling:** CSS with custom properties — Tokens map directly; nothing to compile. - **State:** None by default — Content pages rarely need client state. - **Data:** Markdown/MDX content collections — Writers edit content without touching components. - **Build:** Astro build — Static output with optional server routes. - **Hosting:** Edge static hosting with preview deploys — Fast first byte worldwide. - **Package manager:** pnpm ^9 — Fast, strict installs. - **Testing:** Vitest ^3 — Component and content-schema tests. - **Testing:** Playwright ^1.48 — Smoke tests for every template plus the accessibility audit. - **Testing:** Lighthouse CI ^0.14 — Performance and SEO budgets on every pull request. ## Commands - dev: `pnpm dev` - e2e: `pnpm test:e2e` - lint: `pnpm lint && pnpm check` - test: `pnpm test` - build: `pnpm build` - install: `pnpm install` ## Structure - `src/pages/` — One file per route - `src/layouts/` — Page shells: marketing, article, docs - `src/components/` — Design-skill components as server components - `src/content/` — Markdown content collections with typed frontmatter - `src/styles/tokens.css` — CSS variables from the design skill, light and dark - `public/` — Static assets, fonts and _headers ## Naming - Files: kebab-case - Tests: tests/