diff --git a/lib/app/dataMixin.js b/lib/app/dataMixin.js index 90036ec47a..5b249b4589 100644 --- a/lib/app/dataMixin.js +++ b/lib/app/dataMixin.js @@ -46,9 +46,12 @@ export default { } return targetLang || defaultLang || {} }, + $siteTitle () { + return this.$localeConfig.title || this.$site.title || '' + }, $title () { const page = this.$page - const siteTitle = this.$localeConfig.title || this.$site.title || '' + const siteTitle = this.$siteTitle const selfTitle = page.frontmatter.home ? null : ( page.frontmatter.title || // explicit title page.title // inferred title diff --git a/lib/default-theme/Navbar.vue b/lib/default-theme/Navbar.vue index 571e777aa5..f916668739 100644 --- a/lib/default-theme/Navbar.vue +++ b/lib/default-theme/Navbar.vue @@ -6,9 +6,9 @@ v-if="$site.themeConfig.logo" :src="$withBase($site.themeConfig.logo)"> - {{ $title }} + {{ $siteTitle }}