commit 4076d77029e0705f9e9aa43a347b033dbc2d3cc9
parent 280df4e380798d336826e9ce5446640e881d2b06
Author: spf13 <steve.francia@gmail.com>
Date: Wed, 28 May 2014 18:37:59 -0400
Simplifying the siteInfo handling
Diffstat:
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git 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") {