mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Page Group functions now work even when an uppercase field / method is provided.
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user