A modern content management system built with SvelteKit and Keystatic CMS, deployed on Cloudflare Pages.
svelte-keystatic/
├── src/
│ ├── lib/
│ │ └── keystatic/ # Keystatic integration
│ ├── routes/ # SvelteKit routes
│ └── hooks.server.ts # Server-side hooks
├── content/ # Keystatic content (git-tracked)
│ └── posts/ # Blog posts
├── keystatic.config.ts # CMS configuration
└── .github/
└── workflows/
└── deploy.yml # CI/CD workflow
Clone the repository
Install dependencies:
npm install --legacy-peer-deps
Start development server:
npm run dev
Access the CMS at http://localhost:5173/keystatic
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
The application will be available at http://localhost:5173
The Keystatic CMS will be available at http://localhost:5173/keystatic
npm run build
npm run preview
In development:
/keystatic in your browserContent is stored in the /content directory:
/content/posts - Blog posts in Markdoc formatThe CMS is configured in keystatic.config.ts. You can:
This project is configured for automatic deployment to Cloudflare Pages via GitHub Actions.
Add these secrets to your GitHub repository (Settings → Secrets and variables → Actions):
CLOUDFLARE_API_TOKEN - Your Cloudflare API tokenCLOUDFLARE_ACCOUNT_ID - Your Cloudflare account IDDeployments happen automatically:
main branchThe workflow will:
You can also deploy manually using Wrangler:
npm run build
npx wrangler pages deploy .svelte-kit/cloudflare
MIT