mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
docs: Example of how to use Order by ExpiryDate
This commit is contained in:
parent
02d2f05e74
commit
448f0306d7
1 changed files with 9 additions and 0 deletions
|
@ -187,6 +187,15 @@ your list templates:
|
|||
<div class="meta">{{ .PublishDate.Format "Mon, Jan 2, 2006" }}</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
### Order by ExpiryDate
|
||||
|
||||
{{ range .Data.Pages.ByExpiryDate }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<div class="meta">{{ .ExpiryDate.Format "Mon, Jan 2, 2006" }}</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
### Order by Lastmod
|
||||
|
||||
|
|
Loading…
Reference in a new issue