You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pagination.md 962B

1234567891011121314151617181920212223242526272829303132
  1. +++
  2. title = "Pagination"
  3. weight = 30
  4. +++
  5. Two things can get paginated: a section or a taxonomy term.
  6. A paginated section gets the same `section` variable as a normal
  7. [section page](./documentation/templates/pages-sections.md#section-variables)
  8. while a paginated taxonomy gets the a `taxonomy` variable of type `TaxonomyConfig`, equivalent
  9. to the taxonomy definition in the `config.toml`.
  10. In addition, a paginated page gets a `paginator` variable of the `Pager` type:
  11. ```ts
  12. // How many items per page
  13. paginate_by: Number;
  14. // Permalink to the first page
  15. first: String;
  16. // Permalink to the last page
  17. last: String;
  18. // Permalink to the previous page, if there is one
  19. previous: String?;
  20. // Permalink to the next page, if there is one
  21. next: String?;
  22. // All pages for the current page
  23. pages: Array<Page>;
  24. // All pagers for this section, but with their `pages` attribute set to an empty array
  25. pagers: Array<Pagers>;
  26. // Which page are we on
  27. current_index: Number;
  28. ```