Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-21 23:59:38 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-22 20:41:50 +0300
commita3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f (patch)
tree06cf1f647ae026b4fb3053c85370c2b203c7a089 /tpl/resources
parentcd07e6d57b158a76f812e8c4c9567dbc84f57939 (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.go6
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")
}