July 22, 2022

1914 words 9 mins read

Static Blog vs Wordpress

During my push to write recently, I found myself considering migrating BACK to wordpress from the current static site. This would not be the first time I’ve moved the blog from one technology or another, but certainly a first that I’ve considered moving back to a former technology. It seems like a good time to some reflection on the differences in technologies.

Overtime I’ve made a major change to this blog, I’ve written about it and provided some explanation. Back in February 2020 I posted about the migration to Hugo Static Site. Of course, one of the main logic points is that static HTML can’t break. While that is strictly true, two years of neglect showed that the technology can still break. Now with casual blogging, I think there is an entirely different set of viewpoints to consider. So I’ll

Note: I haven’t used Wordpress recently, and a lot of what I’m comparing against is Hugo-based, but not Hugo specific. So there will be a lot of generalization here.

Getting Writing

As I pointed out in my original migration post, working in static site is a lot more daunting to get started. It shouldn’t be a big deal if you know how to git. However, git is not really the problem. The README.md document that is at the root of this sites source is actually one of the more details README documents I’ve ever had to do, why? Because you have to do everything manually. In Wordpress you click “New Post” and start writing, really nothing more.

Since it’s Hugo/Git, first you should create a new branch by default for the post (though I haven’t been recently because it’s more pain than I care about). Need to create a new post using the correct Hugo command. Then start updating all the metadata in the document header. This last one is trivial to do, but also very easy to forget. I found half the entries I’ve written over the last two years had neglected an Author… because I forgot to update the metadata. Also one entry had the wrong URL format.

Actually writing

Now you can finally start to get writing. Markdown is good, I like it. My note taking application of choice is Inkdrop which is all in Markdown. But since I’m not a developer these days, it’s lazy Markdown I write. Just about everyday I blog I have to remember if link texts have brackets or parens. Overall is it easier to write a link in Markdown than clicking a WYSIWYG editor button in Wordpress? Yes, except for the first time a day.

But then it’s just other things. Embedding images is a special template, embedding tweets or other content is other templates. They aren’t hard, I just don’t use them enough to remember them - so every time I need to go back to a previous post and copy/paste. Even setup the option for captions on my images - but I don’t regularly use it so I need to find a post where those were use. Or perhaps they should be in the README file. Wordpress it’s “push button”.

The generally idea of writing in Markdown was that it would be a “distraction free” experience. But realistically it’s about the same as with Wordpress. It’s just that with Hugo I need to make sure I have the right spellcheck plugin for VSCode installed. Just putting straight text down in Wordpress or VSCode, really doesn’t change all that much.

Editors / Multi-User

Git is great, it’s distributed source code control, it’s got so many features and power… but it’s also complicated. Obviate is a small blog, there is only 3 of us with most of it being me. During the Wordpress era I would write a post to my completion, leave it in pending and then send an IM to John with the link. He’d do his copy-editing magic on the post, set it published (or future, depending on what I had setup) and hit the publish button.

With Git I create a branch, write, add, commit, push, switch to webui, create merge request, assign to John. Then let him know because GitLab’s email notifications didn’t always seem work (or didn’t work expediently. He would then work on copy-editing using the GitLab Web IDE in that merge request, commit, push, then close/merge the request. About 10mn later the new entry would be live.

While John used to be able to write entries of his own, he cannot anymore because he’s on Windows and we haven’t figured out the process for him. He also used to be able to easily preview the entries for any other obvious formatting mistakes - now he cannot because the Web IDE can’t render Hugo content.

Josh also occasionally wrote for us but he’s admitted to me that he didn’t feel like figuring out everything that needed to be done now to get started. He’s a linux user so most of the instructions I have for setup should work for him, but it’s a big lift the first time.

Offline

Which leads me to my next point. One of the “features” of a static site is the fact that you can do all your edits offline. That’s correct, except it also doesn’t include the caveat that you CAN’T properly write not-offline. Yes, the GitLab Web IDE is good and will allow for easy changes online but it’s not a fully fledged writing experience. That can only be replicated on a machine that I’ve setup, configured and tweaked with the needed tools and options. Like I said, VSCode, the correct plugins, Git, Git LFS, Hugo installed (which on a mac basically means homebrew as well.).

Oh, and you have to download THE ENTIRE repo. You might ask “How bad could it be Jon? A thousand or so posts can’t take up that much space?”. You’d be correct in that, the entire /posts/ folder only takes up about 7MB of space (not including the git history). However almost every one of those thousand plus posts has at least one image, sometimes many images - they take up space and they all must be with the content in order for Hugo to render them correct. Right now the two image folders takes up 1.3GB of space. With .git folder, the entire repo takes up 2.4GB on disk at this very moment.

It takes time to download an entire gigabyte of git. Everytime you want to write on a machine, it’s a lengthy dwonload and setup proccess. Since I switch machines fairly regularly (either new computers for work or personal) or reformat and re-install to play with something new… it means I need to complete this setup fairly frequently.

Wordpress may not have an out-of-the-box offline mode, but the online mode means you’re ready to write on ANY computer in under a minute. There are also Wordpress mobile apps, along with multiple lists of offline supporting installed apps. Realistically any text editor on your computer is fine to rough draft something for later posting when you are online.

But in today’s hyper connected world, how often are you truly offline?

Content (image) Management

Wordpress has a solid system for uploading and managing your images. There is even a search. It also handles the things like thumbnails and exif data. Hugo does have some resizing and what not, but has no management to speak of. Fortunately I have Cloudflare as a CDN for the blog, which does render/resize/optimize images regardless of where they originally come from.

Posts, much like the images, have no defacto organization in Hugo. It’s not required because Hugo renders the final destination based on the file metadata… however when you’ve got nearly 15 years of posts, I think it’s important to do. Which just means Hugo provides another area in which you’ve got to remember the manual steps to do.

Comments

There isn’t much to say about this, regardless of if you like comments on blogs or not. Wordpress has a built in mechanism and Hugo does not. I’ve looked at several options for Hugo over the years but never gotten around to pulling the trigger. Mostly because it involves doing a bunch of hacking around javascript and templating which I just don’t want to put that much energy into.

Technology / Integrations

Hugo has some handy out-of-the-box templates, but anything beyond that is going to be work to add. You’re going to spending time in CSS/JSS/HTML/Templating in order to get new functionality in the page. Wordpress is, for the most part, “Search for plugin, install plugin”. Not that every Wordpress plugin is good, or secure, but at least you have a fairly easy option to do so.

There haven’t been a lot of things on this line that I’ve deeply missed but a few come to mind. First was the loss of post-to-social. In the era of wordpress, when a post went live to automatically got posted to applicable socials. Our twitter accounts and sometimes linkedin. That was lost with Hugo and I don’t know of anyway to get it back then some sort of build-time hook. Though more recently I’ve wanted to post more pictures and I have no native-to-hugo gallery that would be useable without a huge uplift.

Stability Over Time

This is one area where some serious flamewars could start, but as I’ve experienced, Hugo does break overtime just like anything else. Yes, the HTML that has been rendered today will continue to exist until the hosting provider dies… but the ability to update that content is assured to be broken.

Wordpress obviously changes over time and clearly has changed enough in the past to annoy me into burning the site down and starting over. Then again, that’s my (unfortunately) default response to a lot of problems.

Security

The static HTML of Hugo is about as secure as you can get. There is no dynamic content by default, but that doesn’t mean you can’t have javascript and iframes (think twitter embeds) that have security risks. It’s not perfect but Hugo is darn near bullet proof.

And Wordpress has gotten a huge amount better over the last decade. Yes, it got a really bad rap for security and deserved that label for a long time. However the developers of Wordpress have put a lot of effort into their security work and it really shows. For some of my friends I’ve continued hosting their wordpress based sites and so far they’ve not been hacked. In fact of all the Wordpress sites I’ve setup, managed, secured, or have involvement with over the last 5 years… only one was compromised due to a bad plugin.

Summary

Clearly I’m a power user. I like to tinker with things, which is why migrating to something like Hugo appealed to me in the past. It’s also been my realization that sometimes you shouldn’t tinker “with production”. If I were running a business off my blog, then something like Hugo might make more sense because there would be multiple people working with it everyday. But in my casual use of “I want to write, but sometimes I want to do more”, it’s not working out as well as I’d hoped. It’s really that “Sometimes I want to do more” that is the problem. Plenty of people use static site blogs with a great deal of success. They are fantastic tools - but maybe I shouldn’t have been so quick to abandon my last platform?