Skip to content

Commit db88a55

Browse files
committed
fix vuejs#906 : Blog plugin blocking front matter custom layout config - cp attrs from default to raw frontmatters, if not exists
1 parent c21a21b commit db88a55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/@vuepress/plugin-blog/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ module.exports = (options, ctx) => {
6464
frontmatter = {}
6565
}) => {
6666
if (when(pageCtx)) {
67-
Object.assign(rawFrontmatter, frontmatter)
67+
Object.keys(frontmatter).forEach(key => {
68+
rawFrontmatter[key] = rawFrontmatter[key] || frontmatter[key]
69+
})
6870
Object.assign(pageCtx, data)
6971
}
7072
})

0 commit comments

Comments
 (0)