It's been a while coming, but over the last couple of months I've finally gone throught the process of migrating my blog content off WordPress and onto a statically hosted site. A few people have asked me why I'd go to the trouble of doing this, so while I'm having a festive break from proper Sitecore stuff, I thought I should write about my reasoning:
This isn't the first time I've changed providers. Back in 2014 when I first started writing, I tried Blogger initially. That didn't last long though - I found formatting code samples to be such a pain there that it drove me to WordPress after a few months.
And WordPress has kept me mostly happy for the years since. But of late they've started moving my cheese quite a bit. They're in the midst of rolling out a series of enhancements towards a more modern editing UI. But in doing that they've made the workflow I've been using harder - and it's started to get on my nerves. Basically I don't get on with the new block editor.
So about a year ago I started looking into the idea of moving. I toyed with a few other more recent blogging platforms, but didn't find one I liked. So I started looking at hosting it myself, in order to have more control...
So I went back to the drawing board and looked for something .Net based. And after a while I came across Statiq. It's an ongoing project to build a modern SSG using .Net core - and it fit my skills better.
So moving away from Wordpress gives me:
So I spent some time on hacking up my own site theme, and pulled together a migration tool to transfer content. And then spent far too long fiddling with the details...
As mentioned the SSG for the new site is Statiq. It's an open source project built on .Net Core. It takes a theme built on Razor Pages, and applies it to markdown files for all your pages and posts. Statiq is just a framework for running content creation pipelines, so you can compile it into whatever application you want.
It comes with pipelines which do all the common blog applications, and I found I didn't need to tweak very much of its out-of-the-box behaviour, outside of the razor files:
So I've got a .Net Core console app project (which happens to be running under .Net 6 - I was very pleased with how easy upgrading to that was) which generates all the mark-up, and handles the static files for the site. And I've made a couple of changes to the standard behaviour:
Both of those were pretty easy changes to make thanks to the way Statiq works.
The build process for Statiq isn't that fast with 260+ posts and all their images. But it works, and the output is easy to host. I'm pushing that to a GitHub pages site, with a bit of powershell to automate the build-and-commit task. While there are lots of different static file hosting solutions I could have used for this, that was just the simplest choice.
And finally, the DNS for the custom domain for the GitHub Pages site is handled by Cloudflare. Nothing clever there - just a CNAME entry in the DNS that points to the relevant thing in GitHub.
Plenty. Other than a few more years of writing every couple of weeks, I've got a bit of a backlog of work still to do:
But despite those things that need sorting, the initial migration seems to be a success. I wonder how long it'll take me to finish all those remaining migration tasks?