-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Description
uglyurls support is configured as map[string]bool according to the following link
hugo/config/allconfig/allconfig.go
Lines 335 to 344 in 9b63552
isUglyURL := func(section string) bool { switch v := c.UglyURLs.(type) { case bool: return v case map[string]bool: return v[section] default: return false } } hugo/config/allconfig/alldecoders.go
Lines 413 to 428 in 9b63552
"uglyurls": { key: "uglyurls", decode: func(d decodeWeight, p decodeConfig) error { v := p.p.Get(d.key) switch vv := v.(type) { case bool: p.c.UglyURLs = vv case string: p.c.UglyURLs = vv == "true" default: p.c.UglyURLs = cast.ToStringMapBool(v) } return nil }, internalOrDeprecated: true, },
but not work
because v is maps.Params[_merge:none post:true]
in p.c.UglyURLs = cast.ToStringMapBool(v)
, none
should be clean