If you’re a long time reader of my blog (and let’s be honest nobody is) you’ll notice that the site design has changed. It’s not just a new theme but actually a new blog software entirely. The way this blog is run is going to be very different. No real chage from your perspective of course but rather the actual server process involved with hosting a blog. I’ll be using this post to explain why I made the decision that I did.

What is Hugo?

Hugo is a static site generator that is free to download and runs on just about any computer from the past ten years. The difference between “traditional blogging software” like WordPress and static site generators like Hugo is precisely what makes this blog so much more efficient than it’s previous iteration.

So then, what’s a static site generator

Here’s a quick example I made using visual imagery.

The Dynamic approach
There's a million lines of PHP between a client request and a server response
Every time a user requests a WordPress page it goes back through all of it’s source code and generates that page from scratch. This allows WordPress to serve different content to logged in users and allow it to process data for things like comments and analytics. Which is great until the poor server has to keep doing this over and over again for unregistered users. WordPress isn’t a terrible solution for websites by many means but I find it’s often too bloated for my own use

The Static approach
Why did I even make a graphic for this?
Because static sites have done the work ahead of time the process for serving it is much simpler. Because of its nature, things that require automated processing like comments and admin have to be done off-site. Making these sacrifices means less time and computation power wasted when the site actually goes live. To give a more tangible understanding I built a simple javascript bookmarklet to compare the size and delay of a served page.

To compare this is the Size/Time on WordPress:
76.47 kb, 0.238s
and on a static site generator:
6.2kb, 0.004s

How hard is it to switch?

The process of migration was actually fairly simple. The Hugo documentation links to a custom WordPress plugin to migrate. It works great but is not compatible with the “.com” cloud-hosted version of WordPress. So what I did was download an XML file which I imported into a local self-hosted WordPress install. From there I ran the WordPress plugin and my content came through without a hitch. I wish it handled some things better, like permalinks, but overall it was a good surface level export. Since WordPress.com servers only run (surprise!) WordPress. I’ll also be migrating the blog over to the only cloud hosting provider for Hugo: Gitlab. Right now I’m just using the default CI file but if anything interesting happens I’m sure I’ll post about it. If Gitlab goes under or if this blog gets out of control I’ll probably migrate over to S3 or equivalent using Cloudflare as CDN.

Conclusion

I’ve gone through a number of website designs, software, and explorations of what’s trendy. This blog was a Drupal install, which was ported over to a WordPress which quickly became a WordPress.com install. If I’ve learned anything over the years and countless changes it’s that it is impossible to oversimplify. The more work I put into making things easy, the better. So I guess what I’m saying is, next year I’ll remove all CSS from my site.