tpl: Fix overlapping layout sections

Fixes #13672
This commit is contained in:
Bjørn Erik Pedersen
2025-04-30 19:49:42 +02:00
parent a1cb15e1cf
commit be93d5218b
2 changed files with 32 additions and 0 deletions

View File

@@ -1396,3 +1396,19 @@ layouts/taxononmy.html.html
b.AssertFileExists("public/p1/index.html", false)
}
}
func TestTemplateLoopBlogVsBlogrollIssue13672(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
-- layouts/blog/all.html --
blog/all.html
-- layouts/blogroll/all.html --
blogroll/all.html
-- content/blogroll/p1.md --
`
b := hugolib.Test(t, files)
b.AssertFileContent("public/blogroll/p1/index.html", "blogroll/all.html")
}