Preview builds, every push to main

Markdown in. A site out. Before you look up.

Douze is a stupidly simple, blazing fast static site generator. One native binary reads your Markdown, Liquid templates and data files, runs them through a workflow of steps, and writes HTML. The next build only runs what changed.

curl -fsSL https://raw.githubusercontent.com/sebastienros/douze/main/install.sh | sh -s -- --preview

~/douze

$ douze -s docs
✓ folder-data    0 files    0.00 s
✓ site-data      3 files    0.00 s
✓ pages         87 files    0.01 s
✓ permalink     90 files    0.01 s
✓ collections   87 files    0.01 s
✓ render        87 files    0.00 s
✓ markdown      85 files    0.11 s
✓ headings      87 files    0.19 s
✓ highlight     87 files    0.53 s
✓ layout        87 files    0.53 s
✓ write        173 files    0.53 s
✓ search       173 files    0.64 s
Build succeeded: 12 steps, 173 files written in 0.68 s
This site, 87 pages, highlighting and search included.

Douze is French for twelve

Twelve things it does well

  1. 01

    No configuration

    A folder of Markdown builds as it is. _content, _includes and _data are optional conventions, Eleventy style.

    Project structure
  2. 02

    One native binary

    A single executable for Windows, macOS and Linux, x64 and arm64. No Node, no runtime to install, no node_modules.

    Installation
  3. 03

    Liquid and Markdown

    Liquid runs before Markdown, as in Eleventy and Jekyll, so pages use variables, loops and shortcodes.

    Markdown
  4. 04

    Workflows

    A douze.yml describes a graph of steps that files flow through, in parallel, GitHub Actions style.

    Workflow architecture
  5. 05

    A real cache

    Every unit of work is cached by its inputs. A second build without changes runs nothing.

    Cache
  6. 06

    Serve and live reload

    Rebuilds only what an edit affects. Stylesheets are swapped in place without a reload.

    Develop and build
  7. 07

    Syntax highlighting

    TextMate grammars and themes, the ones of VS Code and Shiki, with titles, markers and diffs. No Node.

    Syntax highlighting
  8. 08

    Code hovers

    Types and errors of TypeScript, C# and Go samples, twoslash style, from real language servers.

    Code hovers
  9. 09

    Images

    Responsive variants, <picture> markup and Open Graph cards, with libvips.

    Images
  10. 10

    Content at scale

    Collections, pagination, sidebars, locales. Tens of thousands of pages in seconds.

    Collections
  11. 11

    Any tool as a step

    Run a command per file, per batch, or as a long-lived Node worker. Pagefind and Lightning CSS are one line.

    Command steps
  12. 12

    See every millisecond

    A live view of the running steps, Chrome traces and a self-contained timeline of the build.

    Progress and tracing

Workflows

A build is a graph you can read

Without a douze.yml, Douze runs its default workflow. With one, every step is a line: what it needs, which files it matches, what it uses. Steps start as soon as their first file arrives.

This site is built by Douze with a workflow like the one on the right (docs/douze.yml), Pagefind search included.

All built-in steps
docs/douze.yml
steps:
  pages:
    inputs: "_content/**"
    uses: frontmatter
  permalink:
    needs: pages
    uses: permalink
    with:
      root: _content
  render:
    needs: permalink
    uses: liquid
  markdown:
    needs: render
    uses: markdown
  highlight:
    needs: markdown
    uses: highlight
  layout:
    needs: highlight
    uses: layout
  write:
    needs: layout
    uses: write
  search:
    needs: write
    tool: pagefind
    run: "{{ tool }} --site {{ site }}"

Benchmarks

Measured, in a container, against the usual suspects

Zach Leatherman's Markdown build benchmark, reproduced with Hugo, Eleventy, Astro, Jekyll and Douze on the same machine.

Methodology and all results

Start with an empty folder.

The tutorial builds a blog in six short units: pages, includes, layouts, collections, a workflow, and a deploy to GitHub Pages.

Start the tutorial

Esc to close