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

12345678910111213141516171819202122232425262728
  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) and will use
  7. the template mentioned in the section front-matter or the default one.
  8. In addition, a paginated section gets a `paginator` one, which has a `Pager` type:
  9. ```ts
  10. // How many items per page
  11. paginate_by: Number;
  12. // Permalink to the first page
  13. first: String;
  14. // Permalink to the last page
  15. last: String;
  16. // Permalink to the previous page, if there is one
  17. previous: String?;
  18. // Permalink to the next page, if there is one
  19. next: String?;
  20. // All pages for the current page
  21. pages: Array<Page>;
  22. // All pagers for this section, but with their `pages` attribute set to an empty array
  23. pagers: Array<Pagers>;
  24. // Which page are we on
  25. current_index: Number;
  26. ```