Build a theme on the chassis
You build a cairn theme by putting your design on top of the chassis: the plumbing layer every cairn site shares. By the end of this tutorial you will have built a small blog theme from the bare chassis—the same way Waymark, the flagship theme, is built—and you will know which files are yours and which are the chassis’s.
1. Start from the chassis
Copy the chassis into a fresh SvelteKit app:
npx sv create my-theme-site # SvelteKit, TypeScript, no extras
cd my-theme-site
npm install @glw907/cairn-cms
cp -r node_modules/@glw907/cairn-cms/chassis-template/* src/
Look at what you copied. src/chassis/ is the plumbing: content delivery, the token
system, the prose foundation, the composition primitives. You will not edit these files
in this tutorial, but they are yours (the chassis README documents every seam and what
you may remove). Everything you build next lives in src/theme/, which is empty. That
emptiness is the point: a theme is everything that isn’t chassis.
Run the dev server:
npm run dev
You see an unstyled page listing your (empty) content. The chassis works before your theme exists. You’ll rely on that separation every time you change your design without touching your plumbing.
Why a chassis? Every cairn site shares the same delivery, tokens, and prose machinery. Keeping it in one copyable, documented layer means your design work never tangles with plumbing, and plumbing improvements arrive without disturbing your design.