type | title | linkTitle | date | draft | nav_icon | series | categories | tags | images | authors | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
docs |
分页 |
分页 |
2023-05-13 22:32:45 +0800 |
false |
|
|
|
|
该模块附带了一个通用的分页模板,其允许通过参数进行配置,如对齐方式、尺寸和兄弟节点的数量。
{{% hb-module pagination %}}
模板接受一个 Paginator 变量。
{{ partial "hb/modules/pagination/index" .Paginator }}
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
alignment |
string | - | center |
center 、start (左侧)或 end (右侧)。 |
size |
string | - | - | 留空(中等), sm (小)或 lg (大)。 |
siblings |
integer | - | 2 |
当前页码左右侧的兄弟节点数量。 |
{{% bs/config-toggle hugo %}} {{% code-snippet config.yml %}} {{% /bs/config-toggle %}}