isMultiHost = true
}
mergedConfig.Set(kk, vv)
- if cfg.IsSet(kk) {
- rootv := cfg.Get(kk)
+ rootv := cfg.Get(kk)
+ if rootv != nil && cfg.IsSet(kk) {
// This overrides a root key and potentially needs a merge.
if !reflect.DeepEqual(rootv, vv) {
switch vvv := vv.(type) {
b.AssertFileContent("public/index.html", "LanguageCode: en-US|en-US|")
}
+
+// Issue 11047
+func TestConfigYamlNil(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.yaml --
+params:
+-- layouts/index.html --
+Foo: {{ site.Params.foo }}|
+
+
+`
+ b := NewIntegrationTestBuilder(
+ IntegrationTestConfig{
+ T: t,
+ TxtarString: files,
+ },
+ ).Build()
+
+ b.AssertFileContent("public/index.html", "Foo: |")
+
+}