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

Commit 7d40fe3

Browse files
billyyyyy3320ulivz
authored andcommitted
fix: config for summary, summaryLength and pwa (close: #13)(#14)
fix #13
1 parent 627084d commit 7d40fe3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ const removeMd = require('remove-markdown')
22

33
module.exports = (themeConfig, ctx) => {
44
themeConfig = Object.assign(
5-
{},
65
themeConfig,
76
{
8-
summary: true,
9-
summaryLength: 200,
10-
pwa: false,
7+
summary: !!themeConfig.summary,
8+
summaryLength: typeof themeConfig.summaryLength === 'number' ? themeConfig.summaryLength : 200,
9+
pwa: !!themeConfig.pwa,
1110
}
1211
)
1312

0 commit comments

Comments
 (0)