From: spf13 Date: Wed, 28 May 2014 22:37:59 +0000 (-0400) Subject: Simplifying the siteInfo handling X-Git-Tag: v0.11~10 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4076d770;p=brevno-suite%2Fhugo Simplifying the siteInfo handling --- diff --git a/hugolib/site.go b/hugolib/site.go index 26185142..54f90b39 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -260,18 +260,7 @@ func (s *Site) initialize() (err error) { } func (s *Site) initializeSiteInfo() { - paramsV, ok := viper.Get("Params").(map[interface{}]interface{}) - // Warning: viper.Get(map_item) returns map[interface{}]interface{} - // even if .SetDefault called with a map[string]interface{} - if !ok { - paramsV = make(map[interface{}]interface{}) - } - params := make(map[string]interface{}, len(paramsV)) - for k, v := range paramsV { - if s, ok := k.(string); ok { - params[s] = v - } - } + params := viper.GetStringMap("Params") permalinks := make(PermalinkOverrides) for k, v := range viper.GetStringMapString("Permalinks") {