Published on Jan 2, 2022

Modified on Jan 3, 2022

Using the right tools for the right job

I’ve had my domain for a while and I’ve always wanted to create a blog to be, like, cool like the rest of the youngins, ya know.

But time after time, I’ve pushed off the idea of releasing the content. There was that one time when I had my Next.js blog up for some time, but I would never complete the feature set I wanted.

This isn’t to say anything about Next.js, but more on a general level that tooling does impact you and your creation a lot (duh!). I was thinking, hey, maybe I can kill two birds with one stone - learning a cool new technology while creating something with it.

However, when you use hot new tooling for things it is not the best at, it’s an uphill battle. Sure, you can make a blog with Next.js, but I would argue that its strongest suit is server-side rendering - not exactly for creating a blog. There were many hurdles that I had to get through with Next.js - manually installing gray-matter, reading the files in getServerSideProps, … it all felt like trying to fit SSG into an SSR place.

And sure, Astro is the new hot thing on the block lately, but this time, I used it for its intended purpose. Its strongest suit is indubitably static side generation and the creators of Astro has optimized it for that.

It has the proper layers of abstraction for an SSG. (TODO: turn into a pro/con table)

  • Reading files is native with await Astro.glob(...)
  • Similarly following the file structure as pages (like Next.js)
  • Lighthouse is very satisfied with Astro
  • It is very easy to control when the JS loads to speedy up your website
  • …more incoming

Overall, I am quite happy with the MVP result so far. There’s still a lot more work to do in terms of styling and achieving the feature set I’d like to see. I’m hopeful that this gets to see the light of day and not just on the staging domain.

The medium is the message.

Neil Postman