Scaffold a SvelteKit book in seconds.
npm create sveltekitbook@latest my-book
You'll be walked through a handful of choices, then a working SvelteKit
project drops onto disk. npm run dev and the book is live.
sveltekitbook-tour — a sample book that explains the format itself. Source: AndyGauge/sveltekitbook-tour.
By Degrees — U.S. policy mapped on a −5..+5 spectrum. The first book built on this format.
Always:
/)/NN one per section)sveltekitbook runtime as a dependencyStructure — how sections are grouped:
[/] keys to jump between chapters, and a chapter-grouped contents page. Page numbering stays linear across the whole book; chapters are derived from each section's chapterId. Mutually exclusive with timeline / spectrum continua.Chaptered sections can also use a steps array — a strict prose / code / prose / code rhythm, one step at a time:
{
title: 'Push',
gesture: '...',
steps: [
{ prose: 'First we mutate the list...', code: 'fn push(&mut self) { ... }', lang: 'rust' },
{ prose: 'Then we hand back the new head...', code: '...', lang: 'rust' }
]
}
If steps is present, the renderer pairs each prose chunk with its code block in order. Use it for tutorials and code-led explainers.
Continuum format — the axis every page lives on (flat structure only):
year, rendered as dots on a decade axisspectrum integer, rendered as colored dots across a −N..+N ramp with per-page palette shiftsOptional rooms (checkbox each):
[[term]] and they auto-linkContent lives in src/lib/outline.js. Every section is a plain object —
add fields, reorder, drop. Page numbers are assigned automatically by
the sort order you define.
Routes live in src/routes/. They're yours — edit freely.
create-sveltekitslides
is the slide-deck counterpart. Same scroll model, same outline.js
philosophy, different chrome — every slide is a long page where the
projected slide sits above the fold and rehearsal notes scroll into
view below it. Use this package for long-form reader-driven content;
use slides for twenty- to forty-minute talks.