To the chagrin of some, tags in Jekyll are case sensitive. This means that “MySQL” and “mysql” are not the same tag.
No matter whether you’re using jekyll-archives for your tag archives pages, or a custom solution, it’s likely that you’ve felt some pain as a result of case sensitivity. I recently went through every post on this blog and to add consistent casing to my tags.
Here I’ll outline a solution I’ve developed to help alleviate the pain of dealing with case sensitivity and tags in Jekyll.
In January of 2017, I published v0.1.0 of jekyll-pre-commit. The tagline…
A Jekyll plugin to make sure your post is _really_ ready for publishing
jekyll-pre-commit is a tool that uses git pre-commit hooks to run checks before allowing you to commit changes. For example, you can make sure that your post’s meta description meets best practice SEO length requirements.
Now, I’ve updated the gem to v0.2.1 and added a new check “NoDuplicateTags” to help make sure you case sensitivity doesn’t cause any issues when you’re tagging posts.
When enabled this check will run through the all tags in any post that’s staged for commit and confirm that there are no duplicates in other posts throughout your site. If it does find any duplicates, it will tell you about them and prevent you from committing.
Follow the installation instructions to get started with jekyll-pre-commit. The project is 100% free and open source.
I hope you find it useful!
Hi, I'm Max!
If you'd like to get in touch with me the best way is on Twitter.