Skip to content
BaseLayer Themes

Docs

Deploy

Build and deploy to Netlify, Vercel, or Cloudflare Pages.

Build

npm run build

Output: dist/

Set site in astro.config.mjs to your production domain for canonical URLs and the sitemap.

This site is published with Cloudflare Pages (baselayer-themes project).

Setting Value
Production branch master
Build command npm run build
Build output directory dist
Root directory /
Node version 22 (see .nvmrc)
Preview URL https://baselayer-themes.pages.dev

Custom domain DNS

In Cloudflare DNS for baselayerthemes.com, add (proxied / orange cloud):

Type Name Target
CNAME @ baselayer-themes.pages.dev
CNAME www baselayer-themes.pages.dev

Custom domains are already registered on the Pages project (baselayerthemes.com and www). After DNS is proxied, SSL activates automatically.

Ongoing updates

  1. Commit your changes
  2. git push origin master
  3. GitHub Actions builds and deploys (workflow: .github/workflows/deploy-pages.yml)

Required repo secrets: CLOUDFLARE_API_TOKEN (Pages edit permission) and CLOUDFLARE_ACCOUNT_ID.

You can also deploy manually after a local build:

npm run build
npx wrangler pages deploy dist --project-name=baselayer-themes --branch=master

Netlify

netlify.toml is included. Connect your repo:

  • Build command: npm run build
  • Publish directory: dist

Vercel

Import the project with framework preset Astro. Root directory is the theme folder.

Environment

Copy .env.example to .env when using server-side form handlers.

Set site in astro.config.mjs to your production domain for canonical URLs and the sitemap.