vuepress-theme-maker
vuepress-theme-maker copied to clipboard
SSR's `meta` tags do not show up in build's `<head>`
Going to https://80shuo.com/ the html does not have <meta charset="utf-8"> or any other meta tag in HTML head, but those are specified in ssr:
https://github.com/80maker/vuepress-theme-maker/blob/fe72943fff9c97c7e02ad2053308d1a5c293f785/templates/ssr.html#L4
Where could this issue come from?
😮Really? You are right. But, I just view the source of html, it has the right meta tag. I think it probably caused by vuepress itself, because the site of https://vuepress.vuejs.org has this issue too.
A solution I found is to include the following in config.js
head: [
["meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }],
["meta", { charset:"utf-8" }]
]
It's not ideal because iirc these tags are recommended to be in the first 1024 characters of the file, and right now they are under a load of other tags. But a modern browser understands them just fine it appears.
Perhaps their version upgrade will fix it in the future.