Environment Variables
Konten ini belum tersedia dalam bahasa Anda.
Local Development
Section titled “Local Development”Environment variables for local development are stored in .dev.vars:
# Turnstile CAPTCHA (required)TURNSTILE_SITE_KEY=1x00000000000000000000AATURNSTILE_SECRET_KEY=1x0000000000000000000000000000000AA
# Site URL (required)PUBLIC_SITE_URL=http://localhost:4321
# Sveltia CMS backend (optional for local dev)SVELTIA_BACKEND_REPO=your-org/your-repoSVELTIA_BASE_URL=http://localhost:4321Production
Section titled “Production”Production secrets are configured via Cloudflare Pages environment variables:
- Go to Cloudflare Dashboard > Pages > your-project > Settings > Environment variables
- Add the same variables with production values
- For preview environments, add them as Preview variables too
Secrets Validation
Section titled “Secrets Validation”The validate:secrets script checks that all required variables are present at build time:
pnpm run validate:secretsThis runs automatically during CI and will fail the build if secrets are missing.
Branch-Specific Config
Section titled “Branch-Specific Config”Use Cloudflare Pages’ branch-specific environment variables to differentiate between main (production) and content-preview (staging) environments.