Fix paths with dots issue with content adapters

Fixes #12493
This commit is contained in:
Bjørn Erik Pedersen
2024-05-15 11:48:34 +02:00
parent 32c967551b
commit 1aacfced39
3 changed files with 31 additions and 9 deletions

View File

@@ -477,3 +477,20 @@ baseURL = "https://example.com"
b.AssertFileExists("public/docs/p1/index.html", true)
b.AssertFileExists("public/docs/p2/index.html", false)
}
func TestPagesFromGoPathsWithDotsIssue12493(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['home','section','rss','sitemap','taxonomy','term']
-- content/_content.gotmpl --
{{ .AddPage (dict "path" "s-1.2.3/p-4.5.6" "title" "p-4.5.6") }}
-- layouts/_default/single.html --
{{ .Title }}
`
b := hugolib.Test(t, files)
b.AssertFileExists("public/s-1.2.3/p-4.5.6/index.html", true)
}