We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f54b389 commit 804193aCopy full SHA for 804193a
packages/@vuepress/core/lib/client/root-mixins/updateMeta.js
@@ -37,8 +37,14 @@ export default {
37
const pageMeta = this.$page.frontmatter.meta || []
38
// pageMetaTags have higher priority than siteMetaTags
39
// description needs special attention as it has too many entries
40
- return unionBy([{ name: 'description', content: this.$description }],
41
- pageMeta, this.siteMeta, metaIdentifier)
+ const ary = [{ name: 'description', content: this.$description }]
+ if (document) {
42
+ ary.push(
43
+ { charset: document.querySelector('meta[charset]').getAttribute('charset') },
44
+ { name: 'viewport', content: document.querySelector('meta[name=viewport]').content }
45
+ )
46
+ }
47
+ return unionBy(ary, pageMeta, this.siteMeta, metaIdentifier)
48
}
49
},
50
0 commit comments