Gotcha: Netlify Makes All Your Filenames Case-Insensitive
Yesterday, I posted about Making Hugo Generate Case Sensitive URLs, as a way to self-document but also because I wanted to updated my own site to render case-sensitive URLs because I noticed this was not actually rendering them as case-sensitive.
I have a number of specifically case-sensitive URLs which are randomly generated, so use mixed cases so I can decrease the chance of filename collisions.
However, I found that unfortunately this is not a thing that works with Netlify (which I use to host my site) because it actually makes all filenames lowercase, removing any case sensitivity you had set up.
This is an underdocumented gotcha that I found on their community forums. This has meant that unfortunately I've had to change the implementation of my random filename generation to not use uppercase characters.
Please don't fall into the same trap that I did, as there doesn't seem to be an alternative other than "don't have case-sensitive filenames".
From my testing, it appears that if there is a duplicate between a mixed-case filename and a lowercase filename, the filename that has a lowercase path takes priority.