Skip to content

Environment Variables

This is a static site, so most variables are optional. See .env.example for the full list.

Copy .env.example to .env for build-time variables:

# Public production URL (canonical/OG/sitemap)
SITE_URL=http://localhost:4321
# Optional analytics
PUBLIC_GA_MEASUREMENT_ID=
PUBLIC_GTM_ID=

Pages Functions secrets (only the R2 cleanup worker) go in .dev.vars:

CLEANUP_SECRET=dev-cleanup-secret-change-me

Configure variables via Cloudflare Dashboard > Pages > your-project > Settings > Environment variables. Add CLEANUP_SECRET as an encrypted secret.

The validate:secrets script scans the repo for accidentally committed secrets:

Terminal window
pnpm run validate:secrets

It runs during CI and fails the build if a likely secret is detected.