We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6734a60 commit 844a8c7Copy full SHA for 844a8c7
packages/@vuepress/core/lib/app/root-mixins/updateMeta.js
@@ -10,8 +10,11 @@ export default {
10
mounted () {
11
// update title / meta tags
12
this.currentMetaTags = new Set()
13
+ this.updateMeta()
14
+ },
15
- const updateMeta = () => {
16
+ methods: {
17
+ updateMeta () {
18
document.title = this.$title
19
document.documentElement.lang = this.$lang
20
const userMeta = this.$page.frontmatter.meta || []
@@ -31,8 +34,12 @@ export default {
31
34
32
35
this.currentMetaTags = new Set(updateMetaTags(meta, this.currentMetaTags))
33
36
}
- this.$watch('$page', updateMeta)
- updateMeta()
37
38
+
39
+ watch: {
40
+ $page () {
41
42
+ }
43
},
44
45
beforeDestroy () {
0 commit comments