DEV Community


Posted on • Updated on


jsonld in Nuxt 2, super simple, no plugins

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
Enter fullscreen mode Exit fullscreen mode

In your browser use a data sniffer extension to see the results:



More info on Nuxt Head:

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git