diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-11-21 23:59:38 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-11-22 20:41:50 +0300 |
commit | a3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f (patch) | |
tree | 06cf1f647ae026b4fb3053c85370c2b203c7a089 /tpl/resources | |
parent | cd07e6d57b158a76f812e8c4c9567dbc84f57939 (diff) |
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" }}
```
Diffstat (limited to 'tpl/resources')
-rw-r--r-- | tpl/resources/resources.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go index e676a3412..20c4d1b3a 100644 --- a/tpl/resources/resources.go +++ b/tpl/resources/resources.go @@ -19,11 +19,11 @@ import ( "fmt" "path/filepath" - _errors "github.com/pkg/errors" - + "github.com/gohugoio/hugo/common/maps" "github.com/gohugoio/hugo/deps" "github.com/gohugoio/hugo/resources" "github.com/gohugoio/hugo/resources/resource" + _errors "github.com/pkg/errors" "github.com/gohugoio/hugo/resources/resource_factories/bundler" "github.com/gohugoio/hugo/resources/resource_factories/create" @@ -301,7 +301,7 @@ func (ns *Namespace) resolveArgs(args []interface{}) (resources.ResourceTransfor return nil, nil, fmt.Errorf("type %T not supported in Resource transformations", args[0]) } - m, err := cast.ToStringMapE(args[0]) + m, err := maps.ToStringMapE(args[0]) if err != nil { return nil, nil, _errors.Wrap(err, "invalid options type") } |