So I went ahead and followed through on my recent threats. 😂
This site has been redeveloped — again.
What was a very pretty snappy and well-built Gatsby site is now a lightweight Hugo site. And this time I plan to keep it that way (no more changes!).
I mentioned in my previous blog post that I was having major issues with Gatsby build times (even on a heavily optimized site), and my inability to develop it using FreeBSD or OpenBSD became a deal breaker.
Gatsby is, at the time of this writing, utterly unusable on BSD operating systems.
NextJS is mostly fine on FreeBSD but also unusable on OpenBSD.
I reached a point where I realized I was spending way too much time tweaking and fixing sites that I was getting almost no productive work done.
Instead of writing content (which I love to do), I was messing around with Gatsby for days on end.
Whenever I’d write or update a piece of content, I’d have to sit and wait for 20 minutes for the site to build and then manually deploy to a CDN just to view changes.
Not worth it at all (and costing me money in lost time)!
Hugo is seriously underrated
I’m writing this update on OpenBSD, using the latest version of Hugo (extended with Sass), which I Go compiled without a single error or even warning.
Node is working without a problem for PostCSS.
This site builds in just over 1 second, and there are currently around 70 articles, each one optimizing images at build time.
Just over 1 second.
When I git push
this post to Vercel, it will be publicly available to you and the rest of the world in about 10 seconds and I can move on to other work.
Lighthouse score (mobile): 99 - 100.
That. Is. So good.
Coming from Gatsby, I can’t remember the last time I saw performance and ease of use like this.
I forgot how good it feels to have an SSG without any drama and not needing to spend 2 weeks tweaking the hell out of my code to make it acceptably fast.
Hugo just works.
I was put off going back to Hugo as I saw it as a downgrade, but seeing what it’s been capabable of so far and how well it does it, I was wrong.
Not going to lie: The Go language is a fugly language.
The templating for Hugo burns my eyes sometimes. But after spending time with it and understanding how powerful it is, it’s growing on me.
What does Gatsby do better?
The single greatest thing Gatsby does that no other SSG even comes close to is image handling.
I experimented with NextJS and Astro for this site but the image handling was so primitive that it made more sense to stick with Hugo.
So you’ll notice that although the images on this site are well optimized, they don’t have the nice Gatsby touch to them (e.g. things like SVG tracing).
Also, because it’s a plain old fashioned HTML site, you don’t get the nice UX of having a SPA like you get with Gatsby (though this barely matters to visitors).
As nice as these features are, they don’t compare to the outstanding speed and powerful versatility that Hugo offers.
I just love that I can focus on my content and forget about maintaining packages (which is one of the main reasons I left Wordpress years ago). Gatsby became more of a liability than my old Wordpress site in the end.
What about my other sites?
I have dozens of static niche sites.
Most of them are Gatsby sites.
I’ve decided to do two things:
- Redevelop my big authority sites using NextJS (so I can build on FreeBSD)
- Redevelop my smaller content-only sites using Hugo
I’ve already moved my iBSD site back to Hugo (it was previously Jekyll and then Gatsby). It’s doing much better already.
NextJS is for the bigger sites where there’s a lot more need for Javascript and React components.