A Brave New World

Late last year, I discovered that someone had hacked into the Wordpress blog that I’d hosted for years on a Dreamhost server. It took me awhile to clean up the mess, and I took the opportunity to simplify things by leveraging systems offered by my employer.

For starters, I decided to switch to a static website that could be served up from an Amazon S3 bucket, rather than requiring its own server. One way to achieve this would be to roll my own HTML, etc. but that seemed unnecessarily tedious in 2018 when there are sophisticated site generators. The two leading candidates seemed to be Hugo and Jekyll. I opted to go with Hugo, mainly because I’ve never had luck getting anything involving Ruby to work consistently over time on Mac OS, so I thought, “Why not try something totally new and untested?” This review was helpful.

I then needed a theme. Again, I wasn’t interested in rolling my own, but the small handful of Hugo themes I downloaded and tried were broken in some form or another. I ended up taking the Pixyll theme and hacking it up to suit my own needs.

With the site generator configured and working, I then had to import the Wordpress blog, and I found an importer that did the job. All of my old posts appear to have survived the transfer, and I also learned in the process how to use the Dreamhost tools to back up the old site. The one mistake I made resulted in all of my old posts appearing as Hugo pages, but that is something I can fix later. Saving the content was the most important bit.

I configured my S3 buckets for static web hosting and uploaded the website. Next, I had to transfer my domain registration to Route53. This involved meticulously copying over all of the DNS information from Dreamhost (who don’t offer zone files or any easy way to export/import), and then waiting for them to release my domain. That finally happened tonight, and I was able to flip the DNS entries to point at my S3 buckets. Here we are. This is the first post in the new world.

I still need to write a script that automates the whole “check in/build/copy to S3” process. I tried to get clever and use AWS Lambda to rebuild my site automatically whenever a commit was made to the version control system, but that quickly veered into over-engineering. The whole point of this was to simplify.

I also need to go through the old posts and check that images aren’t broken, things are formatted correctly, etc. I don’t have that much content, so it might be faster to look at them one-by-one and just make tweaks as I go.

It has been fun and maybe I will even post again once in awhile.