From 5102e819fef2fa204679259bd4db28e0948ae630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Fri, 24 Mar 2017 01:24:50 +0100 Subject: [PATCH] Use data-* for vue-meta (valid markup) - data-* - remove defer for __NUXT__ script --- lib/app/index.js | 4 ++-- lib/render.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/app/index.js b/lib/app/index.js index 38d5e01fd2..dd14678474 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -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 }) diff --git a/lib/render.js b/lib/render.js index 388eff083c..b15092602a 100644 --- a/lib/render.js +++ b/lib/render.js @@ -101,9 +101,9 @@ export function renderRoute (url, context = {}) { HEAD += `` } HEAD += context.styles - APP += `` + APP += `` 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