mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 04:16:13 +00:00
docs: Example of how to use Order by ExpiryDate
This commit is contained in:
1 parent
b4b1b3f6dd
commit
e986a8fcc4
1 file changed
+9
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user