I just changed all the URLs of my blog posts.
Inspired by Matt Gemmell’s article on Permalinks,
I’ve ditched the /year/month/day
prefix,
so e.g. the URL of this article is now https://blog.doismellburning.co.uk/permalinks/
Jekyll-wise it’s a matter of setting permalink
appropriately in _config.yml
:
Handling the redirects was fun.
I use S3 for hosting. S3 supports web page redirections, and the AWS CLI makes this relatively straight-forward:
A little Python later,
and I had a small script reading a CSV of (old_url, new_url)
pairs and using this to establish the appropriate S3 links:
https://gist.github.com/doismellburning/5a30b1304a602d191bed
Yay for eternal URLs!