brrrty 0.1.15

Brrrty, a fast static site generator compatible with Eleventy (11ty) projects.
Documentation

Brrrty is a static site generator written in Rust that builds your existing 11ty site, with byte-compatible output, in a fraction of the time. Templates, Markdown and data stay as they are. The config moves to a small Rhai script, and brrrty init writes most of it for you.

Running in production

  • brrrty.com is built with Brrrty, from site/ in this repo.
  • joshtronic.com, a 2,272-file blog, is built with Brrrty in GitLab CI on every push. It moved over from 11ty with no changes to its templates, and its output was compared file by file with 11ty's before the switch.

It's early (0.1.x), so try it on a copy of your site first. brrrty doctor --verify builds the site with both and tells you whether every file matches.

Try it on your site

In your 11ty site's folder:

npx brrrty init      # adds brrrty to package.json, ports your config to brrrty.config.rhai
npm install
npx brrrty doctor    # lists anything that keeps a page from building, with file and line
npm run build

init reads your 11ty config without running it, shows its changes as a diff and asks first. What it can't port becomes a // TODO(brrrty): with the original code quoted, and Brrrty won't build pages until those are dealt with. Prebuilt binaries cover macOS (arm64, x64) and Linux (arm64, x64, static, so Alpine works). Or, anywhere Rust 1.89+ runs: cargo install brrrty.

The config

The same calls, in snake_case, with config for eleventyConfig:

// eleventy.config.js
module.exports = function (eleventyConfig) {
  eleventyConfig.addPassthroughCopy("src/images");
  eleventyConfig.addFilter("shout", (s) => s.toUpperCase() + "!");
  eleventyConfig.addCollection("posts", (api) =>
    api.getFilteredByGlob("./src/posts/*.md").reverse()
  );
  return { dir: { input: "src" } };
};
// brrrty.config.rhai
config.add_passthrough_copy("src/images");
config.add_filter("shout", |s| s.to_upper() + "!");
config.add_collection("posts", |api|
    api.get_filtered_by_glob("./src/posts/*.md").reverse());

#{ dir: #{ input: "src" } }

JavaScript data files (_data/*.js, *.11tydata.js) can run in your site's own Node with config.set_js_data("node"), or be ported to .rhai data files. init translates the simple ones and doctor checks each port against the original.

What it does

  • Templates: Liquid, Nunjucks, Markdown and HTML in any mix, with 11ty's data cascade, layouts, pagination, permalinks and collections.
  • Plugins: RSS and syntax highlighting, built in.
  • brrrty serve: rebuilds on every change and updates open pages in place.
  • Refusals: where Brrrty can't match 11ty exactly, it refuses that page, says why with the file and line, and builds the rest. It never writes a page that might differ.

The differences from 11ty page lists everything it refuses or does differently.

How it's checked

Output is compared byte for byte against real 11ty 3.1.8. Test fixtures get their expected output from 11ty itself, run in Docker with no network, and the suite has over 1,400 tests. Parts of 11ty and its dependencies (LiquidJS, Nunjucks, markdown-it, Prism, Luxon and others) are ported closely enough to match their output, each credited in NOTICE. Brrrty was built with Claude Code: Claude wrote the code and Josh steered, with an independent review and a file-by-file comparison against 11ty before every merge. How it was built has the story and what it cost.

On sites it wasn't built for

Every day, Brrrty's main builds a set of public 11ty sites with no hand edits (brrrty init, then brrrty build) and compares every file with the site's own 11ty build, in brrrty/corpus. The chart shows how far each site gets. The goal for 1.0 is about 80% of them byte-identical.

Docs

The name

Brrr + Eleventy = Brrrty, as in "money printer go brrr". Three Rs. It's also a nod to Bertie, who holds the Guinness World Record for the fastest tortoise.

Brrrty exists because Eleventy is great. Thank you to Zach Leatherman and the 11ty community. MIT licensed; see LICENSE and NOTICE.