From c7a792182d3627a8a1993ed22f2e07d780cabc55 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 20 Oct 2022 08:05:39 -0700 Subject: [PATCH] Group photos posts by month and year --- layouts/photos/list.html | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/layouts/photos/list.html b/layouts/photos/list.html index 4382fd4..44f04a2 100644 --- a/layouts/photos/list.html +++ b/layouts/photos/list.html @@ -3,14 +3,17 @@ {{ end }} {{ define "main" }} -
- -
+{{- $pages := (.Paginate (first 50 (.Pages.GroupByDate "January 2006"))).PageGroups -}} +{{- range $pages -}} +
+
{{ .Key | title }}
+ +
+{{- end -}} {{ end }} {{ define "footer" }}