Site Refactoring


Over the years, I’ve changed this thing quite a bit to reflect the realities of the times. Once upon a time, I actually had all of this in Movable Type, which had to change when they changed their business model. Now this is all static and built with Hugo, which has worked fine, but has also evolved. Up until recently, I built the site using version 0.16, which is really going back there.

Obviously, it’s not great to be really locked into to any particular machine for building. With Movable Type, you’d just update it right on the server using their Perl code plus something like the web editor or Windows Live Writer (yup, I actually liked using that thing). But now I usually build it on a desktop after writing in either Sublime Text or Vim. Because this is actually now mostly code, it’s also been added into version control (git), so if I change the server headers or some such, I can look up when and why. If I break the build, git blame can help me find the problem.

Anyway, I have finally updated to building with Hugo 0.55. Unfortunately, in that amount of time, they’d deprecated quite a bit of functionality. That means a more involved process of building, fixing errors, rebuilding, until finally I had a working site. I initially tried building this in WSL (I tend to use Linux, Windows, and OS X), but the incredibly slow file system performance wasn’t a good fit for something like a static site generator which is both going to run over hundreds of files, and then proceed to write them all out once rendered. So, I am taking advantage of the fact that they provide a Windows port (though Windows command line experience leaves a bit to be desired…). I may move this to a new host at some point, too. I am not happy with the current host. Recently broke my Cloudflare integration and left the site unreachable. That’s a fight for another day.

So, what are the changes?

  • New server headers for security
  • Substantial upgrade allows me to do more things, like syntax highlighting using Chroma
  • Source is in git and mirrored to a remote repo

Now my build script looks something like the following:

hugo && rsync -avz -e ssh public/

Remember kids, SSH keys and SSH config are your friend. For that matter, I heavily lean on Bash history, too.