Skip to content

Pete's Dad Blog Thoughts on being a dad

Meta: Technical Update

You may notice that the look and feel of things has slightly changed recently. I got an email recently from my web host saying that they've been bought1, and an immediate followup saying that certain services I'd been using, such as the blog engine supporting this blog2, could not be migrated and would be discontinued as of 9 November.

I could have sought out another dedicated web host, but the fact is that I really don't actually need a server shard to myself. Maintaining a real web host is a full-time job; ignoring that burden is possible (I did it for years!), but makes you vulnerable to all the problems the Internet has to offer.

The expected thing these days, if you want to write a blog, is to sign up with some hosted blogging provider: you create an account, set up recurring credit card payments, and then just write; someone else takes care of the maintenance. That would have been very easy, but the basic monthly price was triple what I'd been paying before.

The problem, on reflection, was that I was thinking like someone who wanted a blog. It's true enough that I could be described like that, but I can also be described as a fairly technically-apt guy. The nice thing about being a fairly technical guy, these days, is that various cloud-based businesses desperately want your business, which means that the economic model is all different. For basic usage3, you can host your website entirely for free, which is pretty nice! I ended up choosing netlify, which has a pretty cool interface, but there really are tons of other options available.

So, that was a solution to the fundamental problem of hosting, but it came with a related problem: the fundamental assumption has changed. This site used to be built on a live blogging platform: you ran the server, and for any request, it ran the appropriate database queries and generated the page. Worked well, but it needs to be running constantly. However, it was also kind of overkill for a blog like this. In principle4, there's no reason that a blog should need a database at all; you could just write the content, and have some software compile it into a set of static HTML files. That approach, it turns out, works very well when applied to netlify.

There are a whole bunch of static site generators out there. I'll skip the discussion of how I chose one; I ended up with Zola. That left me with just one more problem: migrating all my content from the old blog's database. The good news there is that the old blog stored the original markdown within its DB as well as the rendered document, so really it was just a matter of writing the right queries and applying the results to a template.

Some days of happy hacking later, and here we are: the same blog, with the same content, but more free for me and more-or-less invisible to you.

We'll now return you to your regularly scheduled programming.


1

Upon reflection, it's no surprise that they were having trouble keeping business going: they were both very high quality, and very inexpensive.

2

Until now, ghost.

3

"Basic", in this context, is an interesting term. These days, a basic cloud service provides automatic builds on git push; HTTPS; deployments to global edge servers for worldwide availability, and some other neat features, depending on your needs.

4

That's not strictly true: there is one use case for which a live blog server is really useful, and that is to schedule a post to appear sometime in the future without further human intervention. That feature is nice, and I've used it a few times, but it wasn't the kind of critical use case which would have justified the cost.