A lightweight static site generator using Svelte 5 + Vite that creates multi-page sites with shared components and optimized caching.
npm install # Install dependencies
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build locally
When you add a page to src/pages, a corresponding *.html page will be added to the dist directory when you run npm run build. You can then serve the contents of the dist folder on any static web server.
A custom Vite plugin looks for *.svelte files in src/pages. For each page found:
*.html file that mounts the corresponding Svelte component*.html file is based on the template found at src/template.htmlsrc/pages directory are reused between pages (enabling browser caching)src/
pages/ # Each .svelte file here becomes a separate HTML page
lib/ # Shared components used across pages
template.html # HTML template for all pages
app.css # Global styles
plugins/
generate-pages.ts # Custom Vite plugin for page generation
dist/ # Production build output (generated)
.svelte, .ts, and .css files update instantly in the browser.svelte file to src/pages/, restart the dev server to generate its HTML entry pointsrc/lib/ and import them into your pagesSimply deploy the dist/ folder to any static hosting service:
The build outputs fully static HTML, CSS, and JavaScript with no server-side requirements.