mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -3,14 +3,10 @@ title: GroupByLastmod
|
||||
description: Returns the given page collection grouped by last modification date in descending order.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/pages/GroupByDate
|
||||
- methods/pages/GroupByExpiryDate
|
||||
- methods/pages/GroupByParamDate
|
||||
- methods/pages/GroupByPublishDate
|
||||
returnType: page.PagesGroup
|
||||
signatures: ['PAGES.GroupByLastmod LAYOUT [SORT]']
|
||||
params:
|
||||
functions_and_methods:
|
||||
returnType: page.PagesGroup
|
||||
signatures: ['PAGES.GroupByLastmod LAYOUT [SORT]']
|
||||
---
|
||||
|
||||
When grouping by last modification date, the value is determined by your [site configuration], defaulting to the `lastmod` field in front matter.
|
||||
@@ -19,9 +15,9 @@ The [layout string] has the same format as the layout string for the [`time.Form
|
||||
|
||||
[`time.Format`]: /functions/time/format/
|
||||
[layout string]: #layout-string
|
||||
[site configuration]: /getting-started/configuration/#configure-dates
|
||||
[site configuration]: /configuration/front-matter/#dates
|
||||
|
||||
{{% include "methods/pages/_common/group-sort-order.md" %}}
|
||||
{{% include "/_common/methods/pages/group-sort-order.md" %}}
|
||||
|
||||
To group content by year and month:
|
||||
|
||||
@@ -64,4 +60,4 @@ The pages within each group will also be sorted by last modification date, eithe
|
||||
|
||||
## Layout string
|
||||
|
||||
{{% include "functions/_common/time-layout-string.md" %}}
|
||||
{{% include "/_common/time-layout-string.md" %}}
|
||||
|
Reference in New Issue
Block a user