Categories
Posts

Use Apache rewrite rules to force lowercase tags and categories in Pelican 3.2

Update: Actually, this won’t work as well as you’d like it to. I re-read the bug report and it looks like Pelican treats both upper and lowercase tags separately but the files it generates are all lowercase, meaning you’ll end up with a bunch of articles missing from a tag’s index page. Instead, check out this workaround to convert all tags to lowercase in the original Markdown files.

There’s a bug in Pelican 3.2 whereby using capitalised tags or categories in a post will cause Pelican to generate files that are capitalised, but the links will point to lowercase-only names, causing 404s.

Thankfully, it’s been patched and is ready for Pelican 3.3 which will generate lowercase-only HTML. As 3.2 isn’t a stable release yet, unless you’re wanting to run the latest bleeding-edge source then there is a quick workaround.

https://gist.github.com/jordanmerrick/5592294.js

Duplicate the last line if you use categories as well. This assumes you have access to your Apache’s httpd.conf file (since you’re rocking Pelican, I assume you do).