Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'

This commit is contained in:
Bjørn Erik Pedersen
2025-01-23 09:47:46 +01:00
384 changed files with 3305 additions and 3271 deletions

View File

@@ -27,7 +27,7 @@ The most common templating mistake related to pagination is invoking pagination
## Terminology
paginate
: To split a [list page] into two or more subsets.
: To split a [list page](g) into two or more subsets.
pagination
: The process of paginating a list page.
@@ -38,8 +38,6 @@ pager
paginator
: A collection of pagers.
[list page]: /getting-started/glossary/#list-page
## Configuration
Control pagination behavior in your site configuration. These are the default settings:
@@ -116,11 +114,10 @@ To paginate a list page using the `Paginate` method:
In the example above, we:
1. Build a page collection
2. Sort the page collection by title
3. Paginate the page collection, with 7 pages per pager
4. Range over the paginated page collection, rendering a link to each page
5. Call the embedded pagination template to create navigation links between pagers
1. Sort the page collection by title
1. Paginate the page collection, with 7 pages per pager
1. Range over the paginated page collection, rendering a link to each page
1. Call the embedded pagination template to create navigation links between pagers
To paginate a list page using the `Paginator` method:
@@ -135,8 +132,8 @@ To paginate a list page using the `Paginator` method:
In the example above, we:
1. Paginate the page collection passed into the template, with the default number of pages per pager
2. Range over the paginated page collection, rendering a link to each page
3. Call the embedded pagination template to create navigation links between pagers
1. Range over the paginated page collection, rendering a link to each page
1. Call the embedded pagination template to create navigation links between pagers
## Caching
@@ -193,7 +190,7 @@ The `terse` format has fewer controls and page slots, consuming less space when
```
{{% note %}}
To override Hugo's embedded pagination template, copy the [source code] to a file with the same name in the layouts/partials directory, then call it from your templates using the [`partial`] function:
To override Hugo's embedded pagination template, copy the [source code] to a file with the same name in the `layouts/partials` directory, then call it from your templates using the [`partial`] function:
`{{ partial "pagination.html" . }}`