Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'

This commit is contained in:
Bjørn Erik Pedersen
2025-02-13 10:40:34 +01:00
817 changed files with 5301 additions and 14766 deletions

View File

@@ -4,11 +4,10 @@ description: Returns the number of pages per pager.
categories: []
keywords: []
action:
related:
- methods/page/Paginate
related: []
returnType: int
signatures: [PAGER.PageSize]
expiryDate: 2025-06-09 # deprecated 2024-06-09
expiryDate: 2026-06-09 # deprecated 2024-06-09 in v0.128.0
---
{{% deprecated-in 0.128.0 %}}
@@ -16,21 +15,3 @@ Use [`PAGER.PagerSize`] instead.
[`PAGER.PagerSize`]: /methods/pager/pagersize/
{{% /deprecated-in %}}
The number of pages per pager is determined by the optional second argument passed to the [`Paginate`] method, falling back to the `pagerSize` as defined in your [site configuration].
[`Paginate`]: /methods/page/paginate/
[site configuration]: /templates/pagination/#configuration
```go-html-template
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate $pages }}
{{ range $paginator.Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ with $paginator }}
{{ .PageSize }}
{{ end }}
```

View File

@@ -10,7 +10,7 @@ action:
signatures: [PAGER.PagerSize]
---
{{< new-in 0.128.0 >}}
{{< new-in 0.128.0 />}}
The number of pages per pager is determined by the optional second argument passed to the [`Paginate`] method, falling back to the `pagerSize` as defined in your [site configuration].