cleanup sort orders on lists

This commit is contained in:
KemoNine 2023-03-19 09:48:44 -04:00
parent 0134242817
commit 51855b28bc

View file

@ -12,14 +12,14 @@
{{ $pages := .Pages }} {{ $pages := .Pages }}
{{ $paginator := .Paginate (where $pages "Section" "!=" "") }} {{ $paginator := .Paginate (where $pages "Section" "!=" "") }}
{{ if (eq .Type "posts") }} {{ if (eq .Type "posts") }}
{{ range sort $paginator.Pages ".Title" }} {{ range sort $paginator.Pages ".Date" "desc"}}
<li> <li>
<span class="date">{{ .Date.Format "2006/01/02" }}</span> <span class="date">{{ .Date.Format "2006/01/02" }}</span>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a> <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li> </li>
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ range sort $paginator.Pages }} {{ range sort $paginator.Pages ".Title" }}
<li> <li>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a> <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li> </li>