mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Use data-* for vue-meta (valid markup)
- data-* - remove defer for __NUXT__ script
This commit is contained in:
parent
64f83b71c3
commit
5102e819fe
@ -20,8 +20,8 @@ Vue.component(Nuxt.name, Nuxt)
|
||||
// vue-meta configuration
|
||||
Vue.use(Meta, {
|
||||
keyName: 'head', // the component option name that vue-meta looks for meta info on.
|
||||
attribute: 'n-head', // the attribute name vue-meta adds to the tags it observes
|
||||
ssrAttribute: 'n-head-ssr', // the attribute name that lets vue-meta know that meta info has already been server-rendered
|
||||
attribute: 'data-n-head', // the attribute name vue-meta adds to the tags it observes
|
||||
ssrAttribute: 'data-n-head-ssr', // the attribute name that lets vue-meta know that meta info has already been server-rendered
|
||||
tagIDKeyName: 'hid' // the property name that vue-meta uses to determine whether to overwrite or append a tag
|
||||
})
|
||||
|
||||
|
@ -101,9 +101,9 @@ export function renderRoute (url, context = {}) {
|
||||
HEAD += `<base href="${self.options.router.base}">`
|
||||
}
|
||||
HEAD += context.styles
|
||||
APP += `<script type="text/javascript" defer>window.__NUXT__=${serialize(context.nuxt, { isJSON: true })}</script>`
|
||||
APP += `<script type="text/javascript">window.__NUXT__=${serialize(context.nuxt, { isJSON: true })}</script>`
|
||||
const html = self.appTemplate({
|
||||
HTML_ATTRS: 'n-head-ssr ' + m.htmlAttrs.text(),
|
||||
HTML_ATTRS: 'data-n-head-ssr ' + m.htmlAttrs.text(),
|
||||
BODY_ATTRS: m.bodyAttrs.text(),
|
||||
HEAD,
|
||||
APP
|
||||
|
Loading…
Reference in New Issue
Block a user