Debian Codegraph @

docs/content/en/configuration/pagination.md

raw
1 ---
2 title: Configure pagination
3 linkTitle: Pagination
4 description: Configure pagination.
5 categories: []
6 keywords: []
7 ---
8
9 This is the default configuration:
10
11 {{< code-toggle config=pagination />}}
12
13 `disableAliases`
14 : (`bool`) Whether to disable alias generation for the first pager. Default is `false`.
15
16 `pagerSize`
17 : (`int`) The number of pages per pager. Default is `10`.
18
19 `path`
20 : (`string`) The segment of each pager URL indicating that the target page is a pager. Default is `page`.
21
22 With multilingual projects you can define the pagination behavior for each language:
23
24 {{< code-toggle file=hugo >}}
25 [languages.en]
26 contentDir = 'content/en'
27 direction = 'ltr'
28 label = 'English'
29 locale = 'en-US'
30 weight = 1
31 [languages.en.pagination]
32 disableAliases = true
33 pagerSize = 10
34 path = 'page'
35 [languages.de]
36 contentDir = 'content/de'
37 direction = 'ltr'
38 label = 'Deutsch'
39 locale = 'de-DE'
40 weight = 2
41 [languages.de.pagination]
42 disableAliases = true
43 pagerSize = 20
44 path = 'blatt'
45 {{< /code-toggle >}}