Kristian Glass - Do I Smell Burning?

Mostly technical things


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

Jekyll-wise it’s a matter of setting permalink appropriately in _config.yml:

permalink: /:title/

Handling the redirects was fun.

I use S3 for hosting. S3 supports web page redirections, and the AWS CLI makes this relatively straight-forward:

$ aws s3 cp --website-redirect /example-post {empty_file_path} s3://my-blog-bucket/1970/01/01/example-post/index.html

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:

Yay for eternal URLs!