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:
Bjørn Erik Pedersen
2019-11-21 21:59:38 +01:00
parent cd07e6d57b
commit a3fe5e5e35
33 changed files with 317 additions and 155 deletions

View File

@@ -17,6 +17,8 @@ import (
"html/template"
"time"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/common/hugo"
@@ -39,7 +41,7 @@ type Site interface {
Taxonomies() interface{}
LastChange() time.Time
Menus() navigation.Menus
Params() map[string]interface{}
Params() maps.Params
Data() map[string]interface{}
}
@@ -107,7 +109,7 @@ func (t testSite) BaseURL() template.URL {
return ""
}
func (t testSite) Params() map[string]interface{} {
func (t testSite) Params() maps.Params {
return nil
}