Kiln#
Kiln is a documentation-site generator written in Swift. You describe your site in a type-safe Swift configuration and Kiln turns a directory of markdown into a fast, modern static website — no YAML, no Python toolchain.
It was built to replace MkDocs-based documentation sites (such as Vapor’s), so it covers the features those sites rely on: multi-language docs with fallback, a themeable UI, client-side search, admonitions, and more.
New here?
Head to Installation and the
Quick Start to get a site running in a
couple of minutes — or scaffold one instantly with kiln new.
Why Kiln?#
- Swift all the way down — your whole site is a single, type-safe - KilnSitevalue with a navigation result-builder DSL. Configuration mistakes are compile errors, not runtime surprises.
- Localised — first-class multi-language support with automatic fallback to your default language, per-language navigation and UI strings, hreflang alternates, and a language switcher.
- Versioned — ship multiple documentation versions with a built-in version switcher (try it in the top bar). The latest version lives at the root; older and pre-release versions get their own URLs and a banner.
- Not just docs — the same engine builds a plain static site (a marketing or landing site) or a blog with posts, tags, author pages, and an RSS feed.
- Themeable — ships with a fresh, responsive default theme (light/dark, sidebar nav, on-page table of contents). Override any part with your own Leaf templates.
- Searchable — a client-side search index is generated per language. No external service, no build-time JavaScript toolchain.
- SEO-ready — canonical URLs, OpenGraph/Twitter cards, - sitemap.xml,- robots.txt, and a build-time link checker.
- AI-friendly — generates - llms.txtand a raw-markdown copy of every page for tools and agents.
A quick taste#
import Kiln
let site = KilnSite(name: "My Docs", url: "https://example.com") {
Page("Welcome", "index.md")
Section("Guides") {
Page("Configuration", "guides/configuration.md")
}
}
try await Kiln.build(site, contentDirectory: "Content", outputDirectory: "public")
This site is built with Kiln#
Everything you’re reading is generated by Kiln from the markdown in
Examples/ExampleSite.
It doubles as the project’s worked example — the best reference for how a real
site is wired together.