A minimal starting point for static-friendly websites, with no backend.
Stack: SvelteKit 3 / Svelte 5 · Tailwind CSS 4 · Lucide icons · Paraglide i18n · TypeScript · Vercel
This template is built for Bun. Use
bunfor everything (install, scripts, adding packages). Do not use npm/yarn/pnpm: the lockfile isbun.lock, and mixing package managers creates conflicting lockfiles.
bun install
bun run dev # http://localhost:5173Arch Linux: install Bun with curl -fsSL https://bun.sh/install | bash.
| command | what it does |
|---|---|
bun run dev |
dev server |
bun run build / bun run preview |
production build / preview it |
bun run check |
compile messages + svelte-check (types) |
bun run format / bun run lint |
Prettier (with Tailwind class sorting) |
messages/ translations: one JSON file per language (en.json, pt-br.json)
project.inlang/settings.json languages + i18n plugins
src/lib/config/site.ts site name, URL, navigation items, language labels
src/lib/components/ui/ Button, Card, Container, PageHeader, Seo
src/lib/components/layout/ Navbar (with mobile menu), Footer, LanguageSwitcher
src/lib/paraglide/ generated by Paraglide (git-ignored, do not edit)
src/routes/ pages (+page.svelte), layout, error page
src/routes/layout.css Tailwind entry (@import 'tailwindcss')
vite.config.ts Vite + SvelteKit (Vercel adapter) + Paraglide config
- Create
src/routes/contact/+page.svelte:<script lang="ts"> import PageHeader from '#lib/components/ui/PageHeader.svelte'; import Seo from '#lib/components/ui/Seo.svelte'; import { m } from '#lib/paraglide/messages.js'; </script> <Seo title={m.contact_title()} description={m.contact_description()} /> <PageHeader title={m.contact_title()} />
- Add
contact_titleandcontact_descriptionto every file inmessages/. - Add
{ href: '/contact', label: () => m.nav_contact() }tonavItemsinsrc/lib/config/site.ts.
The page automatically works under every language prefix (/contact, /pt-br/contact).
Messages are compiled to typed functions, so a missing or misspelled key is a type error, and only the messages you use end up in the bundle.
<script lang="ts">
import { m } from '#lib/paraglide/messages.js';
</script>
<h1>{m.home_title()}</h1><p>{m.footer_rights({ year: 2026, name: 'My Site' })}</p>URLs: the base language (en) has no prefix, other languages do (/pt-br/about). Always build internal links with localizeHref('/about') (the Button component does this for you).
Adding a language (example: Spanish):
project.inlang/settings.json: add"es"tolocales.- Create
messages/es.json(copyen.jsonand translate). src/lib/config/site.ts: addes: { short: 'ES', name: 'Español' }tolocaleLabels(TypeScript will remind you).
Docs: https://inlang.com/m/gerre34r/library-inlang-paraglideJs
The inlang plugins are installed from npm (not loaded from a CDN) so builds work offline and are reproducible.
| component | usage |
|---|---|
Button |
<Button href="/about" variant="primary|secondary|ghost" size="sm|md|lg">. Without href it renders a <button>. |
Card |
<Card title description> with an optional icon snippet and extra children. |
Container |
centered, padded wrapper: size="sm|md|lg". |
PageHeader |
page title + subtitle block. |
Seo |
sets <title>, description, Open Graph and hreflang alternates. |
Navbar / Footer / LanguageSwitcher |
already used in src/routes/+layout.svelte. |
Dark mode follows the system setting (dark: classes). Change the accent color by replacing orange-* classes.
Import icons one by one to keep the bundle small (browse all icons):
<script lang="ts">
import Rocket from '@lucide/svelte/icons/rocket';
</script>
<Rocket class="size-5 text-orange-500" />Push to GitHub (including bun.lock) and import the repo in Vercel. The SvelteKit preset is detected automatically and Vercel installs with Bun when it finds bun.lock. Before going live, set your real domain in src/lib/config/site.ts (site.url), used for hreflang links.
- SvelteKit 3: Kit config lives in
vite.config.ts(there is nosvelte.config.js), and the import alias is#lib/...(defined inpackage.json > imports), with the file extension in the import ('#lib/foo.js'). - Language switching uses a full page load (
data-sveltekit-reload) so every message re-renders in the new language.