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 299299 b := hugolib .Test (t , files )
300300 b .AssertFileContent ("public/index.html" , "P1: P1.\n P2: foo bar" )
301301}
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)
712712}
713713
714714func (s * TemplateStore ) HasTemplate (templatePath string ) bool {
715+ templatePath = strings .ToLower (templatePath )
715716 templatePath = paths .AddLeadingSlash (templatePath )
716717 return s .templatesByPath .Contains (templatePath )
717718}
You can’t perform that action at this time.
0 commit comments