Fix assets vs data issue

And possibly some other related file mount issues.

Fixes #12133
This commit is contained in:
Bjørn Erik Pedersen
2024-02-28 17:58:27 +01:00
parent be1dbba0f7
commit 4a502f7eb4
2 changed files with 19 additions and 4 deletions

View File

@@ -64,3 +64,21 @@ v1: {{ site.Data.MyFolder.MyData.v1 }}|
b.AssertFileContent("public/index.html", "v1: my_v1|")
}
// Issue #12133
func TestDataNoAssets(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
-- assets/data/foo.toml --
content = "I am assets/data/foo.toml"
-- layouts/index.html --
|{{ site.Data.foo.content }}|
`
b := Test(t, files)
b.AssertFileContent("public/index.html", "||")
}