Shipping a static site

1 min read

The whole site is plain files built once and served from the edge. No server, no database, no client JavaScript.

A blue panel crossed by a yellow bar: the site’s placeholder illustration

Here is the deploy step, more or less:

npm ci
npm run build
npx wrangler pages deploy dist --project-name whydaf

And the config that makes every page a directory with a trailing slash:

export default defineConfig({
  output: 'static',
  trailingSlash: 'always',
  build: { format: 'directory' },
});

Inline code stays inline. That is about it.