mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
Fix Params case handling in the index, sort and where func
This means that you can now do: ``` {{ range where .Site.Pages "Params.MYPARAM" "foo" }} ```
This commit is contained in:
@@ -171,7 +171,7 @@ func toSortedLanguages(cfg config.Provider, l map[string]interface{}) (Languages
|
||||
i := 0
|
||||
|
||||
for lang, langConf := range l {
|
||||
langsMap, err := cast.ToStringMapE(langConf)
|
||||
langsMap, err := maps.ToStringMapE(langConf)
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Language config is not a map: %T", langConf)
|
||||
@@ -192,7 +192,7 @@ func toSortedLanguages(cfg config.Provider, l map[string]interface{}) (Languages
|
||||
case "disabled":
|
||||
language.Disabled = cast.ToBool(v)
|
||||
case "params":
|
||||
m := cast.ToStringMap(v)
|
||||
m := maps.ToStringMap(v)
|
||||
// Needed for case insensitive fetching of params values
|
||||
maps.ToLower(m)
|
||||
for k, vv := range m {
|
||||
|
Reference in New Issue
Block a user