Why can't I differentiate between tags by capitalization?

This issue was solved. See the end of the post for the solution.

I’m trying to use tags to help users find the content they’re seeking. However, capitalization matters with the tags I’m using. Let’s say I have two tags: aA and Aa. In my config, preserveTaxonomyNames is set to true.

When I go to /tags/, it shows me two distinct tags:

  • aA
  • Aa

Yet each of these tags links to /tags/aa/, and when I click on either link, it takes me to the results page for Aa, completely disregarding the results for aA.

How can I configure things so that each tag leads to the correct set of results?

EDIT: Found my answer!

Setting disablePathToLower to true enabled hugo to use upper- and lower-case tags distinctly.

EDIT 2: After fixing the problem so that the site worked perfectly with hugo serve -D, I deployed the generated site, only to discover that the deployed files were missing certain elements. After careful research, I discovered that the default Mac filesystem (I’m using OSX) is case-insensitive. So if you create directory Aa, then try to create directory aA, it fails. For this reason, I will have to create a case-sensitive disk image in which to work, so as to properly maintain case sensitivity. I figured I’d add this information in this post, in case someone else had the same issue.

@CMSteffen wow, last night I met the same issue as you described here. Thanks for your tips.

Glad my post was helpful!