page listing as per the year

This commit is contained in:
kranurag78 2023-03-15 18:21:12 +05:30 committed by Anurag
parent f935dbc74f
commit a44436d237

View file

@ -6,8 +6,13 @@
<h2 class="text-4xl mt-8 mb-8">{{ .Title }}</h2> <h2 class="text-4xl mt-8 mb-8">{{ .Title }}</h2>
{{ end }} {{ end }}
<div class="mt-8"> <div class="mt-8">
{{ range .Data.Pages }} {{ range .Data.Pages.GroupByDate "2006" }}
{{ partial "item.html" . }} <h3 class="text-3xl font-bold mb-4 mt-8">
<a href="#{{ .Key }}">{{ .Key }}</a>
</h3>
{{ range .Pages }}
{{ partial "item.html" . }}
{{ end }}
{{ end }} {{ end }}
</div> </div>
</main> </main>