summaryrefslogtreecommitdiffstats
path: root/hugolib/config_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-16 18:53:34 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-16 18:53:34 +0200
commitfaa6998f266bb37439ae3c945b3883dba945834e (patch)
treeb27a71ab1d2cdfafa410a75ef94ab347db6cdeab /hugolib/config_test.go
parent3d90871e9e8a353e34a44ac50ab5cb1e61bc1005 (diff)
Add Sections to Site interface
See https://github.com/gohugoio/hugo/issues/10947#issuecomment-1550012671 Updates #10947
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r--hugolib/config_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index 169674acb..aa7785f92 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -741,3 +741,30 @@ themeconfigdirparam: {{ site.Params.themeconfigdirparam }}
}
}
+
+// TODO(beo) find a better place for this.
+func TestReproCommentsIn10947(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+-- content/mysection/_index.md --
+---
+title: "My Section"
+---
+-- layouts/index.html --
+Sections: {{ if site.Sections }}true{{ end }}|
+
+
+`
+ b := NewIntegrationTestBuilder(
+ IntegrationTestConfig{
+ T: t,
+ TxtarString: files,
+ },
+ ).Build()
+
+ b.AssertFileContent("public/index.html", "Sections: true|")
+
+}