nuxt-seo
Advanced tools
Comparing version 1.5.3 to 1.6.0
@@ -92,3 +92,4 @@ const path = require('path') | ||
creator: {content: true} | ||
} | ||
}, | ||
jsonld: {content: false} | ||
} | ||
@@ -246,2 +247,4 @@ | ||
module.exports = function (moduleOptions) { | ||
@@ -300,2 +303,2 @@ if (!moduleOptions.meta) { | ||
module.exports.createCanonical = createCanonical | ||
module.exports.template = allMetas | ||
module.exports.template = allMetas |
@@ -18,2 +18,3 @@ const Vue = require('vue') | ||
ctx.app.head.meta = nuxtSeo.createMeta(options, ctx.app.head.meta, template) | ||
if (ctx.route && ctx.route.path) { | ||
@@ -27,2 +28,18 @@ ctx.app.head.link = nuxtSeo.createCanonical(options, ctx.route.path) | ||
if(options.jsonld){ | ||
if ( ctx.app.head.script ){ | ||
ctx.app.head.script = ctx.app.head.script.filter(( item ) => { | ||
if ( item.vmid && item.vmid != 'ldjson-schema') | ||
return item; | ||
}); | ||
} | ||
ctx.app.head.script.push({ | ||
vmid: 'ldjson-schema', | ||
json: options.jsonld, | ||
type: 'application/ld+json' | ||
}); | ||
} | ||
try { | ||
@@ -29,0 +46,0 @@ if (Vue.prototype && Vue.prototype.$meta) { // Vue-meta is enabled |
@@ -5,3 +5,3 @@ { | ||
"preferGlobal": false, | ||
"version": "1.5.3", | ||
"version": "1.6.0", | ||
"description": "SEO / HTML Meta Tags Module for NuxtJS", | ||
@@ -98,3 +98,3 @@ "author": { | ||
], | ||
"gitHead": "792b4c131903e157d578a6309bb66c96e8d2956d" | ||
"gitHead": "978f7ae637eff495ad37cd884e97dfd6ad4f7927" | ||
} |
13758
317