mirror of
https://github.com/gohugoio/hugo.git
synced 2024-07-05 08:42:12 +00:00
Page Group functions now work even when an uppercase field / method is provided.
This commit is contained in:
parent
4b9ea105c2
commit
07f2ef9c5e
|
@ -79,6 +79,9 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (p Pages) GroupBy(key string, order ...string) (PagesGroup, error) {
|
func (p Pages) GroupBy(key string, order ...string) (PagesGroup, error) {
|
||||||
|
|
||||||
|
key = strings.ToLower(key)
|
||||||
|
|
||||||
if len(p) < 1 {
|
if len(p) < 1 {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue