tpl: Fix case issue in templates.Exists

Fixes #13684
This commit is contained in:
Bjørn Erik Pedersen
2025-05-05 10:11:28 +02:00
parent b39b249623
commit 80f0595311
2 changed files with 17 additions and 0 deletions

View File

@@ -712,6 +712,7 @@ func (s *TemplateStore) RefreshFiles(include func(fi hugofs.FileMetaInfo) bool)
}
func (s *TemplateStore) HasTemplate(templatePath string) bool {
templatePath = strings.ToLower(templatePath)
templatePath = paths.AddLeadingSlash(templatePath)
return s.templatesByPath.Contains(templatePath)
}