# Astro
Use Astro when the site is a content-only showcase and motion is the product: a WebGL-heavy
portfolio, a launch microsite, a scroll story with page transitions. It ships static HTML with
minimal JS (about 75 KB gzipped with the full engine, versus about 250 KB on Next.js). Its
ClientRouter lets the leave animation overlap with fetching the next page. Every file below was
built and run under Astro 7.
## Scaffold
```bash
npm create astro@latest
-- --template minimal --add sitemap --install --no-git --skip-houston --yes
cd && npm i gsap lenis ogl && npm i -D playwright axe-core @astrojs/check typescript
```
```
astro.config.mjs site URL, sitemap, prefetch
src/layouts/Base.astro head/SEO, ClientRouter, persisted layers, loader, engine start
src/components/Loader.astro
src/pages/index.astro, work/[slug].astro, 404.astro
src/styles/tokens.css, engine.css (engine.md), site styles
src/motion/setup.ts global motion: transition, loader format/exit, background, driver
src/engine/ engine.md files + astro.ts (below) + gl/ (webgl.md, optional)
src/data/site.ts all content (content.md)
public/robots.txt, favicon.svg, og.png, fonts/
```
## Adapter: `src/engine/astro.ts`
```ts
// Astro adapter (ClientRouter). Call start(setup) once from the layout's
Skip to content