mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-24 21:56:05 +02:00
Fix assets vs data issue
And possibly some other related file mount issues. Fixes #12133
This commit is contained in:
@@ -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", "||")
|
||||
}
|
||||
|
Reference in New Issue
Block a user