File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 299
299
b := hugolib .Test (t , files )
300
300
b .AssertFileContent ("public/index.html" , "P1: P1.\n P2: foo bar" )
301
301
}
302
+
303
+ func TestTemplateExistsCaseIssue13684 (t * testing.T ) {
304
+ t .Parallel ()
305
+
306
+ files := `
307
+ -- hugo.toml --
308
+ -- layouts/home.html --
309
+ P1: {{ templates.Exists "_partials/MyPartial.html" }}|P1: {{ templates.Exists "_partials/mypartial.html" }}|
310
+ -- layouts/_partials/MyPartial.html --
311
+ MyPartial.
312
+
313
+ `
314
+
315
+ b := hugolib .Test (t , files )
316
+ b .AssertFileContent ("public/index.html" , "P1: true|P1: true|" )
317
+ }
Original file line number Diff line number Diff line change @@ -712,6 +712,7 @@ func (s *TemplateStore) RefreshFiles(include func(fi hugofs.FileMetaInfo) bool)
712
712
}
713
713
714
714
func (s * TemplateStore ) HasTemplate (templatePath string ) bool {
715
+ templatePath = strings .ToLower (templatePath )
715
716
templatePath = paths .AddLeadingSlash (templatePath )
716
717
return s .templatesByPath .Contains (templatePath )
717
718
}
You can’t perform that action at this time.
0 commit comments