mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-01 22:42:45 +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:
@@ -22,6 +22,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gohugoio/hugo/common/maps"
|
||||
|
||||
qt "github.com/frankban/quicktest"
|
||||
"github.com/gohugoio/hugo/common/loggers"
|
||||
"github.com/gohugoio/hugo/config"
|
||||
@@ -891,6 +893,15 @@ type TstX struct {
|
||||
unexported string
|
||||
}
|
||||
|
||||
type TstParams struct {
|
||||
params maps.Params
|
||||
}
|
||||
|
||||
func (x TstParams) Params() maps.Params {
|
||||
return x.params
|
||||
|
||||
}
|
||||
|
||||
type TstXIHolder struct {
|
||||
XI TstXI
|
||||
}
|
||||
|
Reference in New Issue
Block a user