Feature Request - Group by date
Would be great to be able to group posts by date similar to Ikiwikis calendar plugin ikiwiki.info/plugins/calendar/
Example
Say I have 4 posts with publications date as follows
- 2025 Dec 1st
- 2025 Oct 5th
- 2025 Jan 15th
- 2025 Jan 1st
Group by date would generate 3 Groups
- Would contain 1 Dec post with URL
<base_url>/blog/2025-12/
- Would contain 1 Oct post with URL
<base_url>/blog/2025-10/
(Note the skipping of empty months e.g. 2025-11) - Would contain 2 Jan posts with URL
<base_url>/blog/2025-01/
Paired with the right template we could have a list on one side for the selected month and a graphical pagination like
Use cases
- Events like rustmanchester .co.uk/events/ would be a lot nicer to show by month
- Archives Group by year/time order
POC
I built out an initial POC on my fork feat(date_pagin): date pagination · seam345/zola@d218acf · GitHub
This worked by adding another Paginator and adding options to the paginate_by config. There is still a lot to do but works as a POC.
Config change
For POC I just got something that worked but it would break backwards compatibility so we need a nicer way to choose between date pagination and normal pagination (I am assuming we have no use cases where generating both index and date pagination exists)
paginate_by = { num = 10 }
is the current old method equivalent to paginate_by = 10
paginate_by = date
will paginate pages by month published.
Templates and URL Scheme
I changed the URL scheme for dates from 1/2/3 to YYYY-MM e.g 2024-11
Next and previous page kinda works out the box but any template that jumps to a specific pager breaks as they assume index so this completely breaks
Other things missing in POC
- Sitemap doesn’t have any of the paginated pages at the moment
- Date pagination doesn’t exist for Taxonomy
- I don’t confirm the sorting is by date atm which can lead to a lot of undefined behavior
Questions
- Before I continue working on it, is this something other people would like?
- Am I missing any other use cases?
- e.g. is there a use case where a section would be paginated traditionally and by date
- At the moment I made it only paginate by month but would it be better to have a year then month pagination?