Order posts by date

This commit is contained in:
Danila Fedorin 2019-08-02 23:05:50 -07:00
parent 49d46a71e6
commit 2cc92a1ec6
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<h2>{{ .Title }}</h2>
<ul>
{{ range .Pages }}
{{ range .Pages.ByDate.Reverse }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>

View File

@ -3,7 +3,7 @@
Recent posts:
<ul>
{{ range first 10 (where (where .Site.Pages.ByDate "Section" "blog") ".Kind" "!=" "section") }}
{{ range first 10 (where (where .Site.Pages.ByDate.Reverse "Section" "blog") ".Kind" "!=" "section") }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>

View File

@ -2,7 +2,7 @@
<h2>Tagged "{{ .Title }}"</h2>
<ul>
{{ range .Pages }}
{{ range .Pages.ByDate.Reverse }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>