Why I Switched from Eleventy to Astro

As of today, I am building this website with Astro. I still adore Eleventy, but I have a specific use case for which Astro seems to be a better fit.

See, I am weird in how I look at the notes I publish here. People with a personal website seem to write a post and be done with it. I, on the other hand, want to maintain my notes over time. Update them, revise language as I learn, add new aspects, or delete obsolete thoughts. To make sure edits are still transparent, I have source control. So far, so good.

Lately, I’ve been thinking about making this MO more prominent here and came up with two ideas:

  1. Shift emphasis from publishing date to updating date by sorting notes by the latter.
  2. Syndicate meatier updates via RSS.

Number 2 has become very important after I realized that working on one specific project and updating the accompanying note is completely invisible to anyone is subscribed to my website. To achieve update syndication, I had to think of updates as movable content pieces rather than edits to an existing document:

I tried my best to model this with Eleventy, but quickly hit an insurmountable roadblock: I did not get WebC to play nicely with permalink: false (Eleventy’s mechanism to skip writing to the file system). Rather than abandoning WebC and trying to get things working with Eleventy’s collections, I turned to Astro and its content collections.

Content collections were exactly what I was looking for: Think of them as collections of content files (aka Markdown, but Astro also supports JSON data files, for example) that you organize in a shallow file structure that does not dictate routing. Instead, you can query and filter these files and assemble your content from them. That means every update to a note can be its own Markdown file that is then rendered as a stand-alone RSS entry and an update section in its parent note 🎉

Not everything about Astro is perfect; sometimes I really miss Eleventy’s simplicity, extensibility, and data cascade. But content collections, out-of-the-box asset handling, and the overall developer experience have won me over. I still need to migrate images, custom WebC components, and projects, but I am already very happy with my new information architecture for notes and their updates.

That migrating from Eleventy to Astro only took me a couple of hours really speaks for the good quality and design of both software products and their docs.