You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that when the template store is created, the filepaths added are normalized, while the argument could be a path containing uppercase letters.
I'm not sure (haven't found any docs) stating the expected format of the partial's filenames, but this issue started appearing from version 0.146.0.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
Details
templates.Exists
returnsfalse
for partials with uppercase letters in their filename.From my analysis, the bug originates from:
https://github.com/gohugoio/hugo/blob/b39b24962350090122b5f3927456dde710cffb57/common/paths/pathparser.go#L49C1-L58
It seems that when the template store is created, the filepaths added are normalized, while the argument could be a path containing uppercase letters.
I'm not sure (haven't found any docs) stating the expected format of the partial's filenames, but this issue started appearing from version
0.146.0
.See also a popular theme using mixed-case partial filenames: nunocoracao/blowfish#2102 (comment)
Screenshots
Building the template store: notice the normalized path in
s
and the original one inunnormalized
Insertion into
templatesByPath
map of normalized pathtemplates.Exists
failure due to comparison of normalized and unnormalized pathsThe text was updated successfully, but these errors were encountered: