In case you haven’t noticed, this page is Powered By Hugo ©. Hugo is a very nice static website engine, taking your neatly arranged directories full of Markdown files and converting it into a pretty website. I had tried to do something similar with Flask but the process of getting a kind of “dynamically-static” site running where I could just drop in new files was too much of a faff. Then a friend recommended Hugo which, after a couple of days of messing about, seems perfect for my use case. It’s taken me a little bit of time to get configured the way I want and to get nginx to play nicely with it. Along the way I’ve learnt a few lessons:
- Don’t code when you’re tired
- Don’t code after a few beers
- For heaven’s sake, test your code
Otherwise you end up with git commit messages such as:
Canonifying URLs (this should fix things, surely?)
Followed closely by:
Oh ffs come on
Problem was a typo on production server. Derp.
The typo in question was my misspelling “DOMAIN” as “DOMIAN” in a git hook script. That’s what I’m going to name my firstborn.
Sad thing is, I’ll probably go through a similar sort of thing when I try to replicate this setup on another server; I’m going to properly document things like this in future, I swear.