How to handle capitalisation of names like "McEwan"

Certain front name declared values like McEwan are causing me capitalisation grief and I’m wondering how to best handle them on a site wide basis? Obviously they can be entered in the front matter in their correct format — McEwan — and then called as such, but if you already have a hundred content files that have been entered all lowercase and you’re using {{ title }} to capitalism them all them that would mean going back and modifying all the .md files manually, so I hope there’s a better way.


The solution I came up with for sections and taxonomy terms was a partial that looks up the lowercase version in a data file named casefix.toml:

{{ index $.Site.Data.casefix (.Title | urlize) | default .Title }}
dna-experiment="DNA Experiment"


1 Like