Skip to content

bearcove/dodeca

Repository files navigation

dodeca

MIT + Apache 2.0 salsa | yes please

A fully incremental static site generator.

Philosophy

Dev mode = Production mode. Unlike other static site generators that take shortcuts in development (skipping minification, using original asset paths, etc.), dodeca serves exactly what you'll get in production: cache-busted URLs, minified HTML, subsetted fonts, responsive images—the works. Even font subsetting runs in dev!

This is possible because dodeca uses Salsa for incremental computation. Every transformation is a cached query. Change a file and only the affected queries re-run. First page load builds what's needed; subsequent requests are instant.

Custom template engine. Dodeca includes its own Jinja-like template engine. This gives us precise error messages with source locations, lets us track template dependencies for accurate incremental rebuilds, and avoids a serde dependency by working directly with native types.

Cache-busting everywhere. All assets get content-hashed URLs (style.a1b2c3d4.css), so you can serve them with aggressive cache headers. This happens in dev too, so you catch any URL rewriting issues before production.

Minification by default. HTML is minified with minify-html, SVGs are optimized with oxvg. Both run in dev mode because the performance cost is negligible and you want to catch issues early.

Responsive image pipeline. Images are automatically converted to JPEG-XL and WebP at multiple breakpoints (320px to 1920px). Each image also gets a thumbhash—a tiny ~28 byte placeholder that displays instantly while the real image loads.

Features

  • incremental builds via Salsa
  • font subsetting (only include glyphs actually used)
  • live-reload dev server
  • Jinja-like template engine with macros and imports
  • Sass/SCSS compilation
  • search indexing via Pagefind
  • internal and external link checking
  • responsive images (JPEG-XL + WebP with thumbhash placeholders)
  • cache-busted asset URLs (in dev and prod)
  • HTML minification
  • SVG optimization
  • Zola-style @/ internal links
  • markdown extensions (tables, footnotes, strikethrough)
  • automatic table of contents generation

Installation

Homebrew

brew install bearcove/tap/dodeca

macOS / Linux

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/bearcove/dodeca/releases/latest/download/dodeca-installer.sh | sh

Windows

powershell -ExecutionPolicy Bypass -c "irm https://github.com/bearcove/dodeca/releases/latest/download/dodeca-installer.ps1 | iex"

With cargo-binstall

cargo binstall dodeca

See cargo-binstall for installation.

From source

cargo install dodeca

Usage

Development

ddc serve

Starts a live-reload dev server with a TUI showing real-time build progress. Pages are built on-demand—only what you request gets built, making startup instant even for large sites.

Press p to expose your local server to a public address (via bore.pub), handy for testing on other devices or sharing previews.

Production build

ddc build

Builds your entire site to the output directory. Thanks to Salsa's incremental computation and a content-addressed storage (CAS) system, subsequent builds only recompute what actually changed.

Configuration

Create .config/dodeca.kdl:

content "docs/content"
output "docs/public"

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

...along with corporate sponsors:

AWS Zed Depot

License

Licensed under either of:

at your option.

About

A salsa-infused static site generator

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published