Skip to content

Commit 384c5c7

Browse files
ulivzyyx990803
authored andcommitted
fix: prioritize frontmatter's title, description and lang (#180)
close #177 close #184
1 parent 3757c6c commit 384c5c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/app/dataMixin.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ export default {
4747
return targetLang || defaultLang || {}
4848
},
4949
$title () {
50-
return this.$localeConfig.title || this.$site.title || ''
50+
return this.$page.frontmatter.title || this.$localeConfig.title || this.$site.title || ''
5151
},
5252
$description () {
53-
return this.$localeConfig.description || this.$site.description || ''
53+
return this.$page.frontmatter.description || this.$localeConfig.description || this.$site.description || ''
5454
},
5555
$lang () {
56-
return this.$localeConfig.lang || 'en-US'
56+
return this.$page.frontmatter.lang || this.$localeConfig.lang || 'en-US'
5757
},
5858
$localePath () {
5959
return this.$localeConfig.path || '/'

0 commit comments

Comments
 (0)