mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
@@ -871,3 +871,29 @@ Param: svParamValue
|
||||
`)
|
||||
|
||||
}
|
||||
|
||||
func TestConfigEmptyMainSections(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.yml --
|
||||
params:
|
||||
mainSections:
|
||||
-- content/mysection/_index.md --
|
||||
-- content/mysection/mycontent.md --
|
||||
-- layouts/index.html --
|
||||
mainSections: {{ site.Params.mainSections }}
|
||||
|
||||
`
|
||||
b := NewIntegrationTestBuilder(
|
||||
IntegrationTestConfig{
|
||||
T: t,
|
||||
TxtarString: files,
|
||||
},
|
||||
).Build()
|
||||
|
||||
b.AssertFileContent("public/index.html", `
|
||||
mainSections: []
|
||||
`)
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user