Why Change the Site?

Posted on Fri, Nov 18 2022 in Site News

Nearly a year ago I got locked out of my WordPress site due to a malfunctioning plugin. I hadn't been especially prolific for years before that happened, so I let it go. I certainly could have updated the plugin and carried on, but having an active WordPress blog inside my household network was beginning to feel like a dangerous security vulnerability, so I left it alone, figuring if I couldn't log in, at least no one else could either.

A random bot attempted to log into my blog every day, slowly shifting later and later. Every morning I got the crash notification from WordPress, letting me know that my site was still alive, if broken. (Let's ignore when the database ran out of space and everything was down for a month.)

Eventually, though, I began to wonder what it might take to move my website outside my home network to somewhere where a security breach would be less devastating. While WordPress certainly has much to recommend it, it is by no means a lightweight tool, and for what I use this blog for (blatant self-promotion) it seemed unnecessary. I'd heard about static site generators for a while. In fact, the very first Bobland, nearly two decades ago, was built using a static-site generator I wrote myself in C++. I had heard good things about Hugo and decided I'd give that a try. I even went so far as investigating hosting, but somehow I ended up choosing a service that didn't allow customers from the United State. So I gave up.

Several weeks ago I saw something (I don't remember what) that inspired me to check out hosting again. I selected a hosting package signed up for an account, and found out that I didn't have my credit card information saved on my workstation. No problem. My wallet was just down the hall. It only took me a few weeks to get it.

It had been a while since I'd looked at Hugo, and I was curious if it was still the recommended engine. I compared it to Jekyll, and found that the reviews were mixed, so I instead searched for the top static site generators of 2022. On the list I found Pelican, a static site generator written in Python that supported theming with Jinja2. It also supported directly importing from a WordPress export. Those all sounded good to me, so I altered my plan and installed Pelican instead of Hugo. I also set up my server with Nginx, and got my SSL certificate.

My initial import of the old site had some issues, but since the "database" is just files in a directory, I was able to move them around and even clean up the text using Perl. Then it was a simple matter of generating the HTML and copying it to my server, which is nicely handled by a simple command. And now we have the site as it exists today (see the date at the top of the article). As a static site, I don't have comments right now. I guess that's what hyperwidgets are for.