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 760B

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