ByPublishDate
Returns the given page collection sorted by publish date in ascending order.
- Syntax
- PAGES.ByPublishDate
- Returns
- page.Pages
When sorting by publish date, the value is determined by your project configuration, defaulting to the publishDate field in front matter.
{{ range .Pages.ByPublishDate }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}To sort in descending order:
{{ range .Pages.ByPublishDate.Reverse }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}Last updated:
June 18, 2026
:
Merge commit 'c86d9f4aa8a58931f52df6516f10b67c807505fb' (be780afa7)
Improve this page