From 0ac60ffa01936c75d31541f03552fe089fd0b406 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 6 Jun 2025 15:06:53 +0800 Subject: feat: open first 3 months' post list instead of just 1 Former-commit-id: f13361b6122cda0f8a0e9b2e59341164c5324715 --- layouts/_default/section.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/_default/section.html b/layouts/_default/section.html index c725fcaa..c051990e 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -3,7 +3,7 @@ {{ partial "header.html" . }}
- {{ $first := true }} + {{ $remainingMonthsToOpen := 3 }} {{ range (where site.RegularPages "Type" "eq" "posts").GroupByDate "2006" -}}

@@ -11,8 +11,8 @@ {{ T "archivePage.postCountAnnual" (len .Pages) }}

- {{ range .Pages.GroupByDate "January" }} -
+ {{ range .Pages.GroupByDate "January" }} +

{{ .Key }} @@ -43,7 +43,7 @@

- {{ $first = false }} + {{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }} {{ end }} {{ end }} -- cgit v1.2.3