A SvelteKit website integrated with Prismic CMS, inspired by the official Nuxt starter template:
Inspired by: https://github.com/prismicio-community/nuxt-starter-prismic-farbe
This project demonstrates how to build a content-driven website using SvelteKit while managing all content through Prismic.
| Category | Technology |
|---|---|
| Framework | SvelteKit |
| CMS | Prismic |
| Build Tool | Vite |
| Language | TypeScript / JavaScript |
| Package Manager | pnpm / npm |
| Content Modeling | Prismic Slice Machine |
farbe-svelte/
āā customtypes/ # Prismic custom content models
āā src/
ā āā lib/
ā ā āā prismicio.ts # Prismic client configuration
ā āā routes/
ā ā āā +layout.svelte # Global layout
ā ā āā [[preview=preview]]/
ā ā ā āā +page.svelte # Homepage with preview support
ā ā āā [uid]/+page.svelte # Dynamic pages (UID-based)
ā āā app.html # Base HTML template
āā static/ # Static assets
āā slicemachine.config.json # Prismic Slice Machine config
āā svelte.config.js
āā vite.config.ts
āā package.json
āā README.md
Using pnpm (recommended):
pnpm install
Or with npm:
npm install
pnpm dev
# or
npm run dev
The site will be available at:
http://localhost:5173
pnpm build
# or
npm run build
This project uses Prismic as a headless CMS.
@prismicio/client@prismicio/sveltesrc / lib / prismicio.ts;
This file initializes and exports the Prismic client used across the app.
SvelteKit routing is filesystem-based:
| Route | Description |
|---|---|
/ |
Homepage (Prismic document) |
/[uid] |
Dynamic pages fetched by UID |
[[preview=preview]] |
Enables Prismic preview mode |
This allows creating unlimited pages directly from Prismic without manual route definitions.
The customtypes/ directory contains Prismic content models.
Slice Machine enables:
This project is inspired by the official Nuxt + Prismic Farbe starter:
š https://github.com/prismicio-community/nuxt-starter-prismic-farbe
The goal of this repository is to provide a SvelteKit equivalent of that architecture and workflow.
This project is open-source and intended for educational and experimental use.