Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Svelte boilerplate by The Pudding with HMR, pre-rendered static HTML, ArchieML micro-CMS, LayerCake charts, and GitHub Pages deployment.
Svelte Starter is a boilerplate template by The Pudding for building Svelte applications with hot module replacement and pre-rendered static HTML for fast, static hosting.
Svelte Starter is a starter template created by The Pudding, a data journalism publication, for building fast Svelte-based websites. It takes Svelte source in src and public/assets and outputs an ssr directory with server-side rendered, static-hostable HTML that hydrates on load. The template runs on Svelte with Rollup as the bundler and includes pre-configured helpers, components, actions, stores, and utilities for interactive data storytelling.
npm run deploy creates an ssr directory with server-side rendered static HTML that hydrates on the client, ready for any static host.config.json and running npm run gdoc to fetch the latest content.global.css inside template.html.make github command deploys the generated ssr directory to GitHub Pages.Svelte Starter is aimed at developers and data journalists who want a ready-made Svelte environment without spending time on build configuration. It suits those building interactive stories, charts, or data-driven articles that need fast static hosting and a simple content pipeline from Google Docs. It is also useful for developers who want to learn Svelte with a structured, feature-rich starting point.
Install the template by clicking the "Use this template" button on GitHub or via npx degit the-pudding/svelte-starter my-project. Then run npm install to install dependencies, npm run dev for local development, or npm run deploy to generate the ssr static directory. For content from Google Docs/Sheets, run npm run gdoc to fetch the latest data.
Yes. Install a preprocessor such as node-sass and add the module to the svelte-preprocess configuration in the rollup config files. The template includes global.css for Water.css variable overrides.
Create a Google Doc or Sheet, set sharing to "Anyone with the link", copy the document ID from the URL, paste it into config.json along with the desired filepath, and run npm run gdoc. For Sheets, include the gid value from the URL.
Yes, run npm run deploy then make github to generate and deploy the ssr directory to GitHub Pages. The template is configured for this workflow out of the box.
The template includes Pudding components like Header and Footer, but The Pudding's logos and fonts are not licensed for reproduction without written permission. You should replace these assets for your own projects.
It is designed for static hosting—the build produces a server-side rendered static ssr directory that can be served from any static host. If you need dynamic server features, you might consider a different framework.
