"author": {
key: "author",
decode: func(d decodeWeight, p decodeConfig) error {
- p.c.Author = p.p.GetStringMap(d.key)
+ p.c.Author = maps.CleanConfigStringMap(p.p.GetStringMap(d.key))
return nil
},
},
"social": {
key: "social",
decode: func(d decodeWeight, p decodeConfig) error {
- p.c.Social = p.p.GetStringMapString(d.key)
+ p.c.Social = maps.CleanConfigStringMapString(p.p.GetStringMapString(d.key))
return nil
},
},
filesTemplate := `
-- hugo.toml --
theme = "mytheme"
+[social]
+twitter = "bepsays"
+[author]
+name = "bep"
[params]
rootparam = "rootvalue"
-- config/_default/hugo.toml --
rootconfigparam: {{ site.Params.rootconfigparam }}
themeparam: {{ site.Params.themeparam }}
themeconfigdirparam: {{ site.Params.themeconfigdirparam }}
+social: {{ site.Social }}
+author: {{ site.Author }}
`
"rootconfigparam: rootconfigvalue",
"themeparam: themevalue",
"themeconfigdirparam: themeconfigdirvalue",
+ "social: map[twitter:bepsays]",
+ "author: map[name:bep]",
)
})