Static pagination helpers for generated Astral routes.
pages/2 splits an in-memory collection into page structs and generates
canonical URLs from an Astral.Route.Pattern compatible pattern:
Astral.Pagination.pages(entries,
pattern: "/blog/*page",
page_size: 10
)The *page glob form omits the page parameter for the first page, producing
/blog/, /blog/2/, /blog/3/, and so on. A required :page parameter can
be used when page one should be explicit: /blog/1/, /blog/2/.
Summary
Functions
Build static pagination pages for entries.
Convert pagination pages into generated routes.
Functions
@spec pages( list(), keyword() ) :: [Astral.Pagination.Page.t()]
Build static pagination pages for entries.
@spec routes([Astral.Pagination.Page.t()], Astral.Config.t(), keyword()) :: [ Astral.Route.t() ]
Convert pagination pages into generated routes.