The Making Of
Filed under: #tech
Welcome to my new site. I’ve been wanting to blog more, but include topics unrelated to Microsoft Dynamics. I wanted a place to put some of the game development stuff I do. And as I’m considering to get into some regular streaming, I want a landing place for anyone checking me out. So, here we are. I started daxmusings.codecrib.com in 2010 on blogspot aka blogger. I attached the custom domain to it at a later time, keeping the daxmusings subdomain. I’ve had stuff on www.codecrib.com on and off, never very interesting. I’ve hosted it in several different ways over the years, most recently as a GitHub Pages site with custom domain attached.
So here were my requirements for the new site:
- combine daxmusings blog into the new one site under www
- original content from daxmusings needs to keep working (pictures for old blogs may be problematic)
- decent site template, no more programmer art
- cheap hosting, preferrably free
- proper content “backup”, source control or whatever
First challenge was getting the content from blogger. They have a nice export feature, which is cool. However, mere mortals will likely not find it very useful. It’s essentially a giant XML file, no line breaks, including site settings, giant section with html template details, comment sections. It’s crazy. Bottom line, I wrote a script to parse out the XML and got all the articles out (PowerShell to the rescue). I dumped the articles into files with the filenames to map to the original URLs. I’m sure there are some small issues in old articles where I know the code/pre tags are incorrect in many places. I’ll go through them slowly and fix them up, sure.
At some point in daxmusing’s life I started hosting pictures on CodeCrib’s www instead of inside blogger itself. That helps as the URLs for the pictures will keep working. Unfortunately, some old pics were hosted inside blogger itself. Also, the URLs refer to http instead of https in many places so not the best security, sadly.
As far as site templates, honestly I threw the dice and searched online for free html templates. I tried to find the simplest one, with not too much scripts or crazy HTML code (so it’s easy to edit). Good enough.
As for technology, the main question is if you can deal with static pages. I took a page from GitHub pages playbook, after using that and actually getting to appreciate the simplicity. It uses Jekyll to produce a static site based off template files and markdown/html files. Templates can loop over special “posts”, so you can produce lists of articles, make filters, etc. Cool stuff. Checkout https://jekyllrb.com/. When working on the template you do need the ability to run this locally to iterate. That is probably the worst part. However, once it’s setup it works just fine.
And then, the hosting… I decided to use Azure’s static website hosting. For those of you familiar, it’s essentially just blob storage with a web endpoint to serve the site… since we’ll produce all the web pages beforehand, that works just fine. Cost-wise, it’ll be cents per month for hosting less than 1GB and hardly doing any “operations” (read/write). Next, I’m using a free CloudFlare account. It will cache the site, making it faster but also avoiding traffic on the storage account. But even more interestingly, it will allow me to attach the custom domain, and get SSL on the custom domain. All for free.
Finally, to tie it all together. I have a Git repo in Azure DevOps, with a pipeline to run the templates and MDs through Jekyll. A release pipeline uploads it to a test Azure blob storage account for review, and a second step to update the actual WWW blob storage. I think there’s an API to flush the CloudFlare cache when the site is updated, I’ll have to check that out to avoid one manual step I’m doing right now.
There is no comment section here, but I would love to hear your thoughts! Get in touch!