diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-11-21 21:59:38 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-11-22 18:41:50 +0100 |
commit | a3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f (patch) | |
tree | 06cf1f647ae026b4fb3053c85370c2b203c7a089 /commands | |
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 'commands')
-rw-r--r-- | commands/import_jekyll.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go index e5c39dc34..b1cc53378 100644 --- a/commands/import_jekyll.go +++ b/commands/import_jekyll.go @@ -30,12 +30,12 @@ import ( "github.com/gohugoio/hugo/parser/metadecoders" + "github.com/gohugoio/hugo/common/maps" "github.com/gohugoio/hugo/helpers" "github.com/gohugoio/hugo/hugofs" "github.com/gohugoio/hugo/hugolib" "github.com/gohugoio/hugo/parser" "github.com/spf13/afero" - "github.com/spf13/cast" "github.com/spf13/cobra" jww "github.com/spf13/jwalterweatherman" ) @@ -420,7 +420,7 @@ func convertJekyllPost(s *hugolib.Site, path, relPath, targetDir string, draft b } func convertJekyllMetaData(m interface{}, postName string, postDate time.Time, draft bool) (interface{}, error) { - metadata, err := cast.ToStringMapE(m) + metadata, err := maps.ToStringMapE(m) if err != nil { return nil, err } @@ -472,7 +472,7 @@ func convertJekyllMetaData(m interface{}, postName string, postDate time.Time, d } func convertJekyllContent(m interface{}, content string) string { - metadata, _ := cast.ToStringMapE(m) + metadata, _ := maps.ToStringMapE(m) lines := strings.Split(content, "\n") var resultLines []string |