mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'
This commit is contained in:
@@ -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 }}
|
||||
```
|
||||
|
@@ -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].
|
||||
|
||||
|
Reference in New Issue
Block a user