tpl: Add test for recent template selection regression

Closes #13868

Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>
This commit is contained in:
Bjørn Erik Pedersen
2025-07-27 12:20:24 +02:00
parent 3937ab24d0
commit 7ff5ec734c

View File

@@ -1603,3 +1603,24 @@ a|b
b.AssertFileContent("public/index.html", "<table>")
b.AssertFileContent("public/index.json", "<table>")
}
func TestPageKindIssue13868(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['home','rss','section','sitemap','taxonomy','term']
-- content/p1.md --
---
title: p1
---
-- layouts/page.html --
layouts/page.html
-- layouts/p1/page.html --
layouts/p1/page.html
`
b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", "layouts/p1/page.html")
}