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

Commit 31f3819

Browse files
committed
refactor: remove lengthy definition
1 parent 8f8b1ad commit 31f3819

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/node/handleOptions.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ export function handleOptions(
6161
frontmatter,
6262
itemLayout = 'Post',
6363
itemPermalink = '/:year/:month/:day/:slug',
64-
pagination = {
65-
lengthPerPage: 10,
66-
} as PaginationConfig,
64+
pagination = {} as PaginationConfig,
6765
} = directory
6866

6967
/**
@@ -136,9 +134,7 @@ export function handleOptions(
136134
layout: indexLayout,
137135
scopeLayout,
138136
frontmatter,
139-
pagination = {
140-
lengthPerPage: 10,
141-
} as PaginationConfig,
137+
pagination = {} as PaginationConfig,
142138
} = frontmatterPage
143139

144140
if (!indexPath) {

src/node/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export function logPages(title, pages) {
5555

5656
export function resolvePaginationConfig(
5757
classifierType: ClassifierTypeEnum,
58-
globalPagination = {} as PaginationConfig,
59-
pagination = {} as PaginationConfig,
60-
indexPath,
58+
globalPagination: PaginationConfig,
59+
pagination: PaginationConfig,
60+
indexPath: string,
6161
ctx: VuePressContext,
6262
keys: string[] = [''], // ['js']
6363
) {

0 commit comments

Comments
 (0)