Type-safe, extensible, and fast. Build your site with Swift's compile-time safety, from metadata to markup.
Install the CLI, scaffold a project, and start a dev server with auto-reload. Your site is a Swift program, ready to build and serve.
brew install loopwerk/tap/saga
mint install loopwerk/saga-cli
$ saga init mysite
$ cd mysite
$ saga dev
Everything you need to build fast, type-safe static sites.
Define custom metadata types with full compile-time safety. Catch errors before they reach production.
A clean, extensible architecture with pluggable readers, processors, and writers.
Articles, apps, pages: each with their own metadata type, readers, and rendering pipeline.
Run saga dev for a local server with file watching and automatic browser reload.
Item, list, tag, and year writers, Atom feed generation, and cache-busting hashed static assets, all built in.
No YAML, no magic. Your site is a Swift program: explicit, readable, debuggable.
Define your entire pipeline in Swift.
struct ArticleMetadata: Metadata {
let tags: [String]
let summary: String
var public: Bool = true
}
try await Saga(input: "content", output: "deploy")
.register(
folder: "articles",
metadata: ArticleMetadata.self,
readers: [.parsleyMarkdownReader],
writers: [
.itemWriter(swim(renderArticle)),
.listWriter(swim(renderArticles), paginate: 20),
.tagWriter(swim(renderTag), tags: \.metadata.tags),
]
)
.run()
From a simple blog to a complex multi-content site, Saga scales with you.
A single site can include blog articles with tags, a project portfolio with App Store links, movie reviews with ratings. Each with their own strongly typed metadata, indexed, paginated, or grouped independently.
Not all content lives on disk. Fetch items from APIs, databases, or any async data source and feed them through the same writer pipeline. File-based and programmatic steps can be freely mixed.
Register custom processing steps for anything beyond the standard pipeline: generate images, build a search index, or minify HTML. If Swift can do it, your build can too.
Compose your site with readers, renderers, and plugins that fit your needs.
Use these packages directly in your build pipeline for syntax highlighting, HTML transforms, and more.