After many, many years I've finally posted an update to this blog, as well as moved it to an entirely different platform. It was previously running on Wordpress but I got sick of having to maintain a public-facing web application, particularly one which needed as many security updates as Wordpress does. The new platform is based on Hugo and doesn't run any dynamic code at all - it just generates static files and those are served directly. I won't guarantee the post frequency will increase, but it does mean a reduction in the time I need to spend just ensuring the software is up to date, so should hopefully give me more incentive to actually write things.
Some quick notes:
- Hugo is extremely quick at generating an entire site, and only takes a second or two to create all of the static files.
- Migrating the content from the old Wordpress site wasn't too bad. I ended up using a converter that was written by Cyrill Schumacher and then just manually fixing things here and there. I've spoken to Cyrill in the past about Magento topics, so it was funny to come across something of his for a completely different application.
- The themes available on the Hugo site are kind of crap. I tried out 4 or 5 which seemed decent and most of them ended up having fairly major issues (Hyde didn't have working pagination, for example). I ended up using Hyde-X and applying some fixes myself. It's still not great, but I'll try to fix it up over time.
- Originally I'd wanted URLs in the format
/year/month/slug.htmland spent quite a bit of time figuring out how to do that - it turns out you need to enable ugly URLs, which wasn't obvious from the docs. Hugo defaults to "pretty" URLs which is what I ultimately decided to stick to, so they now look like
/year/month/slug/. Due tot he way static files work, all of those need to be directories with an
index.htmlfile inside them, which is why I'd originally been averse to using that style.
- The generated files are being stored on Amazon S3 and served through Amazon CloudFront. S3 supports website hosting for static files, so is ideally suited to this type of website. One thing to note for CloudFront is that you can't set up the origin using the S3 bucket name which Amazon helpfully autocompletes for you. Instead, you have to use the website hosting domain provided in S3. If you don't do this S3 won't send back index documents and the like, so the entire pretty URL structure breaks horribly.
- I'm using Amazon Certificate Manager for SSL support on my domain, which works really nicely with CloudFront. S3 doesn't actually support HTTPS connections at all, which was the main reason I to use CloudFront as a proxy.
So, overall the experiment has been a success and I look forward to being able to concentrate on just writing posts, instead of upgrading and tweaking another PHP app.