From ab0e002b7136724a57f675f2c5a3b404354e3c3a Mon Sep 17 00:00:00 2001 From: Nulla Wu Date: Tue, 20 Nov 2018 10:01:03 +0800 Subject: [PATCH] fix($plugin-blog): blocking front matter custom layout config (close: #906) (#1027) --- packages/@vuepress/plugin-blog/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@vuepress/plugin-blog/index.js b/packages/@vuepress/plugin-blog/index.js index 00a4d870f2..ae8d794319 100644 --- a/packages/@vuepress/plugin-blog/index.js +++ b/packages/@vuepress/plugin-blog/index.js @@ -64,7 +64,9 @@ module.exports = (options, ctx) => { frontmatter = {} }) => { if (when(pageCtx)) { - Object.assign(rawFrontmatter, frontmatter) + Object.keys(frontmatter).forEach(key => { + rawFrontmatter[key] = rawFrontmatter[key] || frontmatter[key] + }) Object.assign(pageCtx, data) } })