Star
1.1K

Install Nuxt Schema.org

Get started with Nuxt Schema.org by installing the dependency to your project.
Nuxt SEO Pro
  • Nuxt Redirects
  • Nuxt Google Search Console
  • Nuxt Internal Links
  • Nuxt SEO Analyze
Save $170 on the presale now.

Module Setup

bash
npx nuxi module add schema-org

SPA Warning

Due to the code required to generate Schema.org nodes, it is recommended to use SSR when using this module.

If you need Schema.org support in an SPA please use useHead({ script: [{ type: 'application/ld+json', innerHTML: '...' }] }) to add Schema.org nodes.

Previewing Your Schema.org

After you've set up the module, you should be able to visit your home page and inspect the Schema.org. You'll find the <script type="application/ld+json"> tag with the default Schema.org nodes near the </body> tag.

This is generated by the defaults Schema.org and you can modify the output if it's not what you need.

You can debug this further in Nuxt DevTools under the Schema.org tab.

Next steps

It's recommended to use this module with Nuxt Robots so that the non-indexable paths are automatically excluded from adding Schema.org.

Robots v4.1.10
734K
421
Tame the robots crawling and indexing your site with ease.

Other suggestions:

Did this page help you?