Deployment Guide
npm run build makes a static site in the dist/ folder, which any static host can serve. Settings are included for Netlify, Vercel, and Cloudflare Pages. To use another host, see Astro’s deployment guides.
Before You Deploy
Set your site’s address in baseUrl under [site] in src/config/config.toml. It ships with a sample address. Canonical links, the sitemap, robots.txt, llms.txt, and social previews use it. A SITE_URL environment variable overrides it for a build.
Use the Node.js version listed under engines in package.json.
Netlify
The included netlify.toml sets the build command (npm run build), the dist folder, Node.js 22, cache headers, and a “page not found” rule for each language.
- Create a new site on Netlify.
- Connect your Git repository.
- Netlify reads its settings from
netlify.tomland deploys your site.
Vercel
The included vercel.json sets the trailing slash and the sitemap redirect. The included vercel.sh script builds your site with your Vercel project’s address, which overrides baseUrl.
- Create a new project on Vercel.
- Connect your Git repository.
- Vercel reads its settings from
vercel.jsonand deploys your site.
Cloudflare Pages
- Create a new project on Cloudflare Pages.
- Connect your Git repository.
- Set the build command to
npm run buildand the output folder todist. - Set the Node.js version with a
NODE_VERSIONenvironment variable, using the version inpackage.json.
The included wrangler.toml names the project after the theme, so change its name if you deploy with Wrangler.
Headers And Missing Pages
The included public/_headers, vercel.json, and public/.htaccess serve the .md and llms files as text, and keep the .md copies out of search results. On any other host, set the same headers yourself. See AI Links & llms.
Only netlify.toml includes a “page not found” rule for each language. On other hosts, a missing /fr/ or /ar/ address may show the default language’s 404 page unless you add a rule.
Tina Edition
The site builds and works with no account and no variables. To edit online, add PUBLIC_TINA_CLIENT_ID and TINA_TOKEN to your host. See Tina.
Sanity Edition
Add PUBLIC_SANITY_PROJECT_ID and PUBLIC_SANITY_DATASET to your host, plus PUBLIC_SANITY_STUDIO_URL once your Studio is online. Without them, the site builds from the bundled demo content. The site must rebuild to show content you publish. See Sanity.