The last blog post I wrote here was just over 10 years ago. Welcome back.
I recently decided that the old Wordpress installation that powered this here website was enough of a security liability that I wanted to get rid of it. For some reason, Wordpress has long had a complicated security history. Between the complex admin interface, the fact that it writes e.g. images directly to the filesystem, generally likes to make liberal use of Apache .htaccess files for writing mod_rewrite rules, generally requires use of third party plugins of uneven quality and has a commenting system, Wordpress has evolved into a complex application. And I don’t need a complex application for a teeny personal blog like this. Moreso when one considers the fact that I’ve maintained this Wordpress installation for 10 years without actually using it. It’s been like an antisocial pet for me during this time. It requires constant care and feeding, yet, sadly, gave me nothing in return.
So I ditched it. I wanted something much simpler. I don’t care about comments, really. If people want to get a hold of me, there are many ways to get my attention. I went searching for one of these Jamstack static content generators that I could use to bake some static files onto disk and serve them with nginx or whatever webserver I choose to use over time. Jekyll seems to be the most popular of such things, but I really need less Ruby in my life. Since Hugo is written in a less offensive language, I decided to try that.
Next challenge: importing my old content. Turns out there are a few Wordpress-to-Hugo content convertors, but I’m not smart enough to get any of those to work. After a few hours of reading their code and shoddy docs, I finally came to my senses and realized I could just write such an importer myself faster than I could get one of these pieces of garbage to work. Sure enough, I was able to do so. Here’s a crappy utility that you can customize to extract bits of a Wordpress XML export and write a bunch of Markdown files onto disk with the correct timestamps and whatnot. I’m sure there are bugs and shortcomings. I don’t care. It was a one time thing. Use it if you want.
Other than that, the hardest part of using Hugo is choosing a theme. I ended up finding one of the various Paper themes and customized that a bit to suit my needs. And now my life is simple again.