Permalink
Browse files

Simplifying the siteInfo handling

  • Loading branch information...
1 parent 280df4e commit 4076d77029e0705f9e9aa43a347b033dbc2d3cc9 @spf13 committed May 28, 2014
Showing with 1 addition and 12 deletions.
  1. +1 −12 hugolib/site.go
View
@@ -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") {

0 comments on commit 4076d77

Please sign in to comment.