diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-02-03 15:43:28 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-02-03 16:30:10 +0100 |
commit | 46575baa02562e4ad05c89f4250287413e38627a (patch) | |
tree | 80a33f896a58dd224be332c439dddeaf3083e797 /hugolib/datafiles_test.go | |
parent | 058f230a1be1abaf589b5a194ef6ec12d14c4021 (diff) | |
download | hugo-46575baa02562e4ad05c89f4250287413e38627a.tar.gz hugo-46575baa02562e4ad05c89f4250287413e38627a.zip |
Preserve file/dir name case when loading data
Fixes #11979
Diffstat (limited to 'hugolib/datafiles_test.go')
-rw-r--r-- | hugolib/datafiles_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hugolib/datafiles_test.go b/hugolib/datafiles_test.go index 48447414a..99cc5b407 100644 --- a/hugolib/datafiles_test.go +++ b/hugolib/datafiles_test.go @@ -47,3 +47,20 @@ d: {{ site.Data.d.v1 }}| b.AssertFileContent("public/index.html", "a: a_v1|\nb: b_v1|\ncd: c_d_v1|\nd: d_v1_theme|") }) } + +func TestDataMixedCaseFolders(t *testing.T) { + t.Parallel() + + files := ` +-- hugo.toml -- +baseURL = "https://example.com" +-- data/MyFolder/MyData.toml -- +v1 = "my_v1" +-- layouts/index.html -- +{{ site.Data }} +v1: {{ site.Data.MyFolder.MyData.v1 }}| +` + b := Test(t, files) + + b.AssertFileContent("public/index.html", "v1: my_v1|") +} |