aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/datafiles_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-28 17:58:27 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-28 19:26:55 +0100
commit4a502f7eb475afa35849b3dcf312daf3e3832d51 (patch)
treee2eb5855e0f6c8e20537e4f81b8bd7601a0dc66f /hugolib/datafiles_test.go
parentbe1dbba0f78f2cf7f7019c01cc8705fa339ea995 (diff)
downloadhugo-4a502f7eb475afa35849b3dcf312daf3e3832d51.tar.gz
hugo-4a502f7eb475afa35849b3dcf312daf3e3832d51.zip
Fix assets vs data issue
And possibly some other related file mount issues. Fixes #12133
Diffstat (limited to 'hugolib/datafiles_test.go')
-rw-r--r--hugolib/datafiles_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/hugolib/datafiles_test.go b/hugolib/datafiles_test.go
index 99cc5b407..657e6020c 100644
--- a/hugolib/datafiles_test.go
+++ b/hugolib/datafiles_test.go
@@ -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", "||")
+}