On a page in the head method you can add jsonld like this:
head() {
return {
script: [{
type: 'application/ld+json',
innerHTML: JSON.stringify(this.jsonld) // <- set jsonld object in data or wherever you want
}],
__dangerouslyDisableSanitizers: ['script'], // <- this is important
};
},
In your browser use a data sniffer extension to see the results:
More info on Nuxt Head:
https://nuxtjs.org/docs/components-glossary/head/
Top comments (0)