Yet another site rebuild, this time with Astro

Published:

Let’s be honest, I don’t really write that much, and I probably won’t “finally start writing more,” but I do like to tinker with my site and try new things. So here we are, another rebuild, this time with Astro.

It gave me the opportunity to learn a few new things, try some new ideas, and ultimately I like my site even better now—and boy is it blazing fast even though the script bundle is larger than before!

A screenshot of a 99/100/100/100 mobile Google Pagespeed score
73k.us mobile pagespeed score
A screenshot of a 100/100/100/100 desktop Google Pagespeed score
73k.us desktop pagespeed score

Astro is a little bit more than just another static site generator, but that’s how I’m using it—like hugo and eleventy before.

The old

Hugo is fine (and fast!), but I found the templating language and project structure clunky and difficult to reason about, and some of its design counter to my needs. I felt some anxiety and avoidance about using it, always a deterrant to writing.

Eleventy was also fine, but almost too flexible and barebones in certain areas, which can lead to difficulty finding relevant support or documentation for specific use cases. And while it technically supports several templating engines, since none are “native,” trying to implement what you need can still be clunky.

The new

Meanwhile, Astro so far seems to strike a good balance between “opinionated” and “flexible.” Once I wrapped my head around the basics, the rest felt natural to me.

This was also an opportunity to start getting familiar with TypeScript and Tailwind CSS, which I’d been meaning to do.

Dropping Bootstrap, I still wanted some interactivity, and although it increases the js bundle size to use a library like Alpine.js, I’m already familiar with it and it’s a joy to use, so that’s what’s helping drive what little there is.

And then just for fun, I was able to use HTMX for a content loading trick I had been wanting to try. Really not necessary for a little site like this, but it tickles me. Plus, HTMX is just a project I can’t not love.

With some other tweaks, such as how I use fonts, the result is blazing fast whether served via Cloudflare or, as I tested just out of curiosity, on a self-hosted KVM VPS web server.

Now let’s see if I feel inspired to publish more.