However, I cannot seem to paginate the results using .Paginate, because it expects Pages but receives a []map[string]interface{}. I found it weird, because I thought the pagination worked also with the grouping functions, and if I am not mistaken, they return a slice of strucs containing Key and Pages, right?
Anyway, when I then tried to simply paginate the pages of the taxonomy on the page, the result was always nil. I checked if .Paginate is used in the theme, but it only seems to be used in layout/index.html, and if I am not mistaken, it should not interfere with the generation of a taxonomy page, right?
Could you please help me find a way to paginate those results?
// PageGroup represents a group of pages, grouped by the key.
// The key is typically a year or similar.
type PageGroup struct {
// The key, typically a year or similar.
Key any
// The Pages in this group.
Pages
}
I revised my Go notions, and indeed there does not seem to be a way to do that right now.
However, maybe it’d be possible to extend the library to have GroupBy accept some logic through for example a block name that would return a key for each page?