Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 784118f

Browse files
committed
docs: update pagination config
1 parent f4a28b1 commit 784118f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/pagination/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We strongly recommend that you read the [Getting Started](../guide/getting-start
1010

1111
## sorter
1212

13-
- Type: string
13+
- Type: function
1414
- Default: `See Below`
1515

1616
Sorter for matched pages, the default sorter is as follows:
@@ -22,10 +22,11 @@ function sorter(prev: VuePressPage, next: VuePressPage){
2222
return prevTime - nextTime > 0 ? -1 : 1
2323
},
2424
```
25+
The function will be a parameter of [Array.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
2526

2627
## lengthPerPage
2728

28-
- Type: string
29+
- Type: number
2930
- Default: `10`
3031

3132
Maximum number of posts per page.
@@ -39,7 +40,7 @@ Layout for pagination page (Except the index page.)
3940

4041
## getPaginationPageUrl
4142

42-
- Type: string
43+
- Type: function
4344
- Default: `See Below`
4445

4546
A function to get the url of pagination page dynamically:
@@ -55,9 +56,8 @@ function getPaginationPageUrl(index) {
5556

5657
- For [directory classifier](../README.md#directory-classifier), the `indexPath` defaults to `/${classifier.id}/` (e.g
5758
. `/post/`)
58-
- For [frontmatter classifier](../README.md#frontmatter-classifier), the `indexPath` defaults to `/${classifier
59-
.pid}/${classifier.id}` (e.g.
60-
`/tag/js/`)
59+
- For [frontmatter classifier](../README.md#frontmatter-classifier), the `indexPath` defaults to `/${classifier.pid}/${classifier.id}`
60+
(e.g. `/tag/js/`)
6161

6262

6363

0 commit comments

Comments
 (0)