From c9b07007cdb54fb589e9e99137dd06bb176e5638 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Fri, 26 Oct 2018 01:51:03 +0800 Subject: [PATCH] feat: frontmatter.seoTitle --- packages/@vuepress/core/lib/prepare/ClientComputedMixin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@vuepress/core/lib/prepare/ClientComputedMixin.js b/packages/@vuepress/core/lib/prepare/ClientComputedMixin.js index 311a8378de..e0646a02f3 100644 --- a/packages/@vuepress/core/lib/prepare/ClientComputedMixin.js +++ b/packages/@vuepress/core/lib/prepare/ClientComputedMixin.js @@ -63,6 +63,11 @@ module.exports = siteData => { get $title () { const page = this.$page + const { seoTitle } = this.$page.frontmatter + if (typeof seoTitle === 'string') { + return seoTitle + } + const siteTitle = this.$siteTitle const selfTitle = page.frontmatter.home ? null : ( page.frontmatter.title || // explicit title