Local sites
Environment Variables
Configure .env for local sites or Payload CMS
Local sites
Place .env in vitepress-template/:
SITE_NAME=showcase
This loads pages and settings from sites/showcase/. Use any site name that exists in sites/ (e.g. my-site).
If neither SITE_NAME nor SITE_SLUG is set, showcase is used as the default.
Payload CMS
To build from Payload CMS instead:
SITE_SLUG=your-site-slug
PAYLOAD_API_URL=http://localhost:3000/api
PAYLOAD_API_KEY=your-secret-key
SITE_SLUG(orSITE_ID) — Target site slug in PayloadPAYLOAD_API_URL— Default:http://localhost:3000/apiPAYLOAD_API_KEY— Optional; use if the API requires auth
When SITE_SLUG is set, SITE_NAME is ignored and pages are fetched from Payload.
Assets (R2)
For Payload images stored in Cloudflare R2:
R2_PUBLIC_URL=https://assets.cta.pages.studio
Block processing converts relative Payload URLs to this base. Default: https://assets.cta.pages.studio.
Next: Site Settings