Eleventy

When I started this blog in 2011, I built it using Jekyll. Jekyll served me well for fifteen years. It was fast enough, and though it would take me an hour or two to get the system reinstalled when I switched laptops, it mostly just worked. But late last year, I was in the midst of updating all of my local installations to the latest versions of their runtimes, and when I tried to update Jekyll to Ruby 4, it wouldn't go. The Jekyll project did eventually merge support for Ruby 4 (a one-line fix) in February , but I took this as a sign to get going.
I probably could have kept on with Jekyll for another few years, but there's no denying the project has slowed down, and my optimization stack for this blog has gotten a little more complicated - it'd be nice to use a tool more optimization-minded and simplify my toolchain.
So: I switched to 11ty. Or, as it is about to be called Build Awesome. I switched and started to write this blog post before all of the hubbub: I have some thoughts, but that's not the point.
Why eleventy for macwright.com?
The 800 pound gorilla is Astro, not Eleventy. There are lots of other static site generators, like hakyll (in Haskell) or dodeca (in Rust). I could build one myself, as many have before.
For this site, I don't have any other stakeholders. I don't have to onboard anyone to new tech, or impress anyone with my decisions. There are a few simple priorities for this website:
- Simplicity
- Longevity
- Speed
I care about both internal and external simplicity: both the simplicity of the API as well as the implementation. This is because for any tool, I expect it to break, and I want to be able to open it up and find the problem. It's also a key factor because complex projects are dramatically harder to maintain, so they tend to have lower longevity if they don't achieve dominance.
Longevity is hard to predict. The Lindy Effect is a good shortcut:
the future life expectancy of some non-perishable thing, like a technology or an idea, is proportional to its current age
But in tech, the newest solution could also be the best one. You have to do a little bit of predicting. Large contributor bases are also indicative, but only if they represent multiple entities. A project with lots of contributors from the same company can get quiet very quickly if they lay everyone off. It also counts if the project has survived multiple changes in control and power.
For this website, I care more about end-user speed than development speed. Whether it takes 100ms to preview a Markdown change for me doesn't matter as much as how long a pageload takes for a reader. Most static site generators are pretty fast if you don't do silly things anyway. In my experience, SSGs that were "slow to build" had nested loops that soaked up most of the time.
Eleventy checks enough of these boxes. The contributor base is quite small, but Zach is very persistent and has been through it all. It's both fast to build websites, and has lots of tools for optimizing websites - tools that let me replace custom code I had written for macwright.com. And, in sharp contrast to Astro, it is written with internal simplicity as a priority. It is both a small project in terms of lines-of-code, and it is also not dependent on mega-dependencies. A fresh install of Astro includes 246 dependencies, including Vite and esbuild. Eleventy includes about half - 116 dependencies, and they weigh 14.6MB instead of 87.9MB.
I think Eleventy could be even simpler (and made a small PR in that direction while writing this post) by cutting some old dependencies with unnecessary micro-dependencies in them. The e18e project to remove and shrink dependencies is so needed!
SSGs are a tough way to make a living
Of course, there's the news: Eleventy is now Build Awesome. This comes on the tails of lots of similar announcements from other projects:
- Cloudflare acquired Astro
- Netlify acquired Gatsby
- Shopify acquired Remix
- Vercel acquired Nuxt
- Sanity acquired Begin
Because these are open source projects, the word "acquired" deserves an asterisk: usually they're hiring the team, maybe getting the trademark, and whatever business lines were there.
Zach got a bit of heat for this move. I agree that 'Build Awesome' sounds millenial and Eleventy was a cooler name. The rebrand was odd.
But overall, I get it. You can't slowly trickle out a big strategy and product launch and consult everyone. Eleventy fits fairly well with the rest of the Web Awesome products: icons, web components, and a static site builder. They're all good web tools in the traditionalist rather than frontend-maximalist vein.
I think as we've seen, it's also extraordinarily difficult to monetize low-level tooling, in large part because every developer is ready to start building their own SSG for any reason or no reason at all because it sounds like a fun side-project. You can monetize higher-level content tooling - Kirby, Sanity, and a few other site generators with a CMS component have done that and built small, sustainable businesses. But something in the exact shape of Eleventy doesn't work as a small product business. You'd have to do services, at the bare minimum.
So, the outcomes are kind of like:
- They get acquired by some large, possibly public company as a way to increase the platform for their hosting / CDN product. This is the fate of Astro, Nuxt, Gatsby, Remix, and to some extent, Begin. Jekyll was this from the start: it was created by Tom Preston-Warner at GitHub and was the jet fuel for making GitHub Pages a success.
- The maintainer never goes full time and has some lightweight day job or indirect way of making money. This I also heavily associate with the pleasure of living in a country with a strong welfare state and affordable healthcare. I really appreciate how much long-term, high-quality software comes out of this scenario but cannot emphasize how bad it is to buy your healthcare on the exchanges every month.
- They attempt to build a company around it, directly related to the tool. Remix did this early on, selling licenses, and Astro attempted to launch some products. Eleventy is trying this out, in combination with launching a CMS and some other features.
It's not easy: you can't achieve #2 if you live in America and have a family, and #1 is perhaps an 'ignorance is bliss' kind of solution in that open source isn't really sustainable if it's only a loss-leader.
Eleventy so far
So anyway, I've been using Eleventy since January, how is it going?
Mostly good! Some highlights include using the Image plugin to optimize my images even more than they used to be optimized, and pulling HTML minification straight into the build process with a little optimize plugin. Building the site is a bit faster than it used to be, and using Eleventy's powerful-but-confusing directory data files, I've been able to simplify each blog post, using directories instead of frontmatter for categories.
Templating is fun: using Vento templates is mostly great because they let me write arbitrary JavaScript in templates. And unlike Liquid, they don't quietly fail.
WebC is a source of joy and pain for me. In one sense, it's an absolutely golden tool: it lets you embed components in pages with server-side rendering, automatic bundling, and excellent performance. It's simple, too! The package is small because it doesn't pull in a big JavaScript transpiler like esbuild. I used WebC recently for the chart on In the Atmosphere and the demo in Color dithering.
But there is pain, too. It's a very unique tool with lots of constraints, and if you mess something up it fails hard. The documentation merely gestures at its potential and leaves lots and lots of questions unanswered. I think it could be amazing and is already quite good, but it needs a lot more love, as Zach admitted in a recent talk.
For both WebC and Eleventy, I have mixed feelings about the non-adoption of TypeScript. WebC had a bug that would be trivially identified by TypeScript or even just a linter. I think the tooling for these projects could be a bunch better.
But complaining is overrated: I've been trying to contribute to the projects. Mostly this means contributing to the documentation, which could still use a lot of work. The commercialization of Eleventy complicates this, which is partially why I've been stalled on documentation updates since February: it opens the question of whether there'll be some great, paid documentation contributor swooping in and making everything I do irrelevant. Maybe the Kickstarter campaign will do really well and there'll be multiple funded maintainers, or at least Zach will be comfortably full-time. I hope that at least it frees up enough time for 11ty and all if its related projects to get lots of pull requests reviews and merged, because unfortunately the pace there has been slow.
Should you use Eleventy? Maybe! Building a new static site generator from scratch is fun, but participating in a community and improving a popular tool is enriching in a totally different way.
Eleventy has a lot less buzz than Astro. And it has a lot of its own issues. But like other software, it's an expression of a vision and a bunch of values, and a lot of that resonates with me. I hope that it's the right kind of software, and I'll still be using it in 15 years.
Oh, and if you're excited about the Build Awesome launch, sign up for its Kickstarter. I'll probably chip in a few bucks too.