What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
Deployment
Deploy the Agility SvelteKit starter to Netlify — adapter setup, environment variables, and rebuilding on publish with Build Hooks.
Legacy — SvelteKit docs are no longer actively maintained. The SvelteKit starter targets SvelteKit 2; SvelteKit 3 shipped in October 2026. See why we recommend Next.js and .NET. If you need SvelteKit, let us know.
Netlify is a first-class target for the SvelteKit starter: @sveltejs/adapter-auto detects Netlify and uses the Netlify adapter automatically.
Push your copy of the starter to GitHub (or GitLab/Bitbucket).
In the Netlify dashboard, Add new site → Import an existing project, pick the repo. Netlify detects SvelteKit; the defaults (npm run build) are correct.
Set these under Site configuration → Environment variables before building — the starter reads them from $env/static/private, which is inlined at build time:
| Variable | Value |
|---|---|
AGILITY_GUID | Your instance GUID (Settings → API Keys) |
AGILITY_API_FETCH_KEY | Fetch (live) API key |
AGILITY_API_PREVIEW_KEY | Preview API key |
AGILITY_SITEMAP | Sitemap/channel reference name (e.g. website) |
AGILITY_LOCALES | Locale code (e.g. en-us) |
Trigger the first deploy — the sitemap prerenders at build time.
Published changes appear after a rebuild (the starter prerenders — see Routing & Sitemaps):
npm i -D @sveltejs/adapter-netlify@6
The starter uses SvelteKit 2.
@sveltejs/adapter-netlify7 and later require SvelteKit 3, so install version 6 until you upgrade the starter to SvelteKit 3.
// svelte.config.js
import adapter from '@sveltejs/adapter-netlify';
export default { kit: { adapter: adapter() } };
Preview mode note: the starter's preview toggle is for local dev. Production serves published content; review staged content locally with
npm run dev, or stand up a second Netlify site built with the preview key.