← blog.responsive.ch

Moving to Astro

Blogs are great. They are my main source of (tech) information and I very much enjoy following people like Jim Nielsen, Dave Rupert or Simon Willison. Their feeds have a cozy home in my RSS reader.

When I decided to do more writing of my own, the first step was crystal clear: Replace the underlying framework of this blog so the actual writing part can be postponed.

As a responsible web developer, I’m obligated to spend at least 75% of my time evaluating new web frameworks. And there is no better way to do this than using them on important customer personal projects. When setting this blog up two years ago, Gastby was shiny. It worked out fine and I learned the basics about the framework. (What I took away from it was that it felt a bit over-engineered.)

Getting back to it after more than a year and on a computer with a different processor architecture, I was obviously unable to run npm install without a few cheeky errors and warnings. As upgrading to the latest version would have meant following three different migration guides in sequence, I just picked up a new shiny object: Astro.

I had been closely following Astro’s development and very much sympathized with its general philosophy:

[…] cover a wide range of styles in the noise field, from space music to psychedelically-tinged harsh noise

Never mind, wrong Astro. This one here:

Zero JavaScript Runtime. Astro renders HTML on the server and strips away any remaining, unused JavaScript.

Now you might think this is irrelevant for a blog with zero client-side JavaScript to begin with. Great thinking! However, there are frameworks whose main purpose is to generate JavaScript out of no JavaScript so they can send it to the visitors of your website because they hopefully are JavaScript afficionados, too.

My Astro Takeaways

  1. It’s fun! Even the installation process, thanks to Nate Moore’s great work. 1

    create-astro saying hi to me
  2. There are less dependencies:

    • node_modules before: 479.8 MB for 59'083 items
    • node_modules after: 242.1 MB for 10'110 items

    As everything below 250 MB does not count as a real node_modules folder by law, we basically have no dependencies.

  3. I’m missing the possibility to add the complete post to the RSS feed (currently a limitation of using MDX).

  4. The community is really welcoming. When I opened a PR to add support for footnote customizations in Astro’s MDX integration, Sarah Rainsberger and Ben Holmes 2 were very helpful and kind.

Further reading

Footnotes

  1. We were lucky enough to have Nate speak at this year’s Front Conference in Zürich. Turns out he knows more about the city’s fountains than every living resident.

  2. Ben came up with a really fun way to present tech topics on a whiteboard, check out #WhiteboardtheWeb videos!