Fix branch resource overlapping bundle path

Fixes #13228
This commit is contained in:
Bjørn Erik Pedersen
2025-01-09 06:01:58 +01:00
parent 61d3d20129
commit c5a63a3b4f
2 changed files with 46 additions and 2 deletions

View File

@@ -361,6 +361,35 @@ p1-foo.txt
b.AssertFileExists("public/s1/p1/index.html", true)
}
// Issue 13228.
func TestBranchResourceOverlap(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
-- content/_index.md --
---
title: home
---
-- content/s1/_index.md --
---
title: s1
---
-- content/s1x/a.txt --
a.txt
-- layouts/index.html --
Home.
{{ range .Resources.Match "**" }}
{{ .Name }}|
{{ end }}
`
b := Test(t, files)
b.AssertFileContent("public/index.html", "s1x/a.txt|")
}
func TestSitemapOverrideFilename(t *testing.T) {
t.Parallel()