Become a backer or sponsor to support our work.
This module ships with an universal pagination template, which allows configuring by parameters, such as alignment, size and the number of siblings.
Module | github.com/hbstack/pagination |
---|---|
Repository | ⭐ Please consider giving a star if your like it. |
Stars | |
Version | |
Used by | |
Requirements | |
License | |
Usage | See how to use modules. |
The template accepts a Paginator variable.
1{{ partial "hb/modules/pagination/index" .Paginator }}
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
alignment | string | - | center | center , start (left) or end (right). |
size | string | - | - | Empty (middle), sm (small) or lg (large). |
siblings | integer | - | 2 | The number of siblings to the left/right of the current page number. |
hugo.toml
1[params]
2 [params.hb]
3 [params.hb.pagination]
4 alignment = 'center'
5 siblings = 2
6 size = ''
hugo.yaml
1params:
2 hb:
3 pagination:
4 alignment: center
5 siblings: 2
6 size: ""
hugo.json
1{
2 "params": {
3 "hb": {
4 "pagination": {
5 "alignment": "center",
6 "siblings": 2,
7 "size": ""
8 }
9 }
10 }
11}