mirror of
https://github.com/getzola/zola
synced 2024-12-14 22:32:29 +00:00
b3004c69ef
Closes #533
1.4 KiB
1.4 KiB
+++ title = "Pagination" weight = 30 +++
Two things can get paginated: a section or a taxonomy term.
A paginated section gets the same section
variable as a normal
section page minus its pages
while
Both get a paginated page gets a paginator
variable of the Pager
type:
// How many items per page
paginate_by: Number;
// The base URL for the pagination: section permalink + pagination path
// You can concatenate an integer with that to get a link to a given pagination page.
base_url: String;
// How many pagers in this paginator
number_pagers: Number;
// Permalink to the first page
first: String;
// Permalink to the last page
last: String;
// Permalink to the previous page, if there is one
previous: String?;
// Permalink to the next page, if there is one
next: String?;
// All pages for the current page
pages: Array<Page>;
// Which page are we on
current_index: Number;
Section
A paginated section gets the same section
variable as a normal
section page minus its pages.
Taxonomy term
A paginated taxonomy gets two variables:
- a
taxonomy
variable of typeTaxonomyConfig
- a
term
variable of typeTaxonomyTerm
.
See the taxonomies page for a detailed version of the types.