diff options
Diffstat (limited to 'hugolib/pageGroup.go')
-rw-r--r-- | hugolib/pageGroup.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hugolib/pageGroup.go b/hugolib/pageGroup.go index 8aaa1018c..f12eff253 100644 --- a/hugolib/pageGroup.go +++ b/hugolib/pageGroup.go @@ -296,3 +296,10 @@ func (p Pages) GroupByParamDate(key string, format string, order ...string) (Pag } return p.groupByDateField(sorter, formatter, order...) } + +// Group creates a PageGroup from a key and a Pages object +func (p *Page) Group(key interface{}, pages Pages) (PageGroup, error) { + pageGroup := PageGroup{Key: key, Pages: pages} + + return pageGroup, nil +} |