Correct date behaviour on sections. [#124] (#125)

Closes #124
This commit is contained in:
Vighnesh Shenoy
2019-06-09 02:10:06 +05:30
committed by Michael Noronha
parent 915f2000ff
commit 944fd12cea

View File

@@ -14,12 +14,14 @@
{{ $sectionTitle := .Title }}
<ul>
{{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}}
{{ if not (and (eq (len .Pages) 1) (eq (index .Pages 0).Title $sectionTitle)) }}
<li class="groupby">{{ .Key }}</li>
{{ range sort .Pages "Date" "desc" }}
{{ if (not (eq $sectionTitle .Title)) }}
{{ partial "li.html" . }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>