-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all: Unify case of config variable names #2571
Conversation
f2a6d4e
to
3015f78
Compare
Any questions or offers? |
No. I'm just waiting to merge a potential conflicting PR, that's all. |
Ok |
And I was right. a10b2cd created some conflicts in this PR. Sorry for dumping this in your lap, so to speak, but I just had to get that commit just right without too much distractions. If you do a |
No problem. I will solve it now |
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI.
Solved |
Thanks for this, it looks so much better now. @digitalcraftsman the docs got a cleanup of this, too. I'm not aware of any functional changes since Hugo 0.17 -- maybe we should just rebase the docs branch against master? |
This would be a good idea. I would rather preferring to cherrypick this single commit in order to minimize merge conflicts. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
All config variables start with low-case and use camelCase.
If there is abbreviation at the beginning of the name, the whole abbreviation will
be written in low-case
If there is abbreviation at the end of the name, the whole abbreviation will
be written in upper-case.
For example, rssURI.
Also, the performance will be better, because
viper
lowers case of keys with functionstrings.ToLower
, which callsstrings.Map(unicode.ToLower, str)
and this function works so, what the later there will be upper-case rune, the faster it will work.Conversation: https://discuss.gohugo.io/t/viper-why-hugo-sets-keys-in-upper-case