Install Nuxt Schema.org
Setup Module
npx nuxt module add schema-org
npm i nuxt-schema-org
You will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-schema-org',
],
})
yarn add nuxt-schema-org
You will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-schema-org',
],
})
pnpm i nuxt-schema-org
You will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-schema-org',
],
})
bun i nuxt-schema-org
You will need to manually add the module to your Nuxt config.
export default defineNuxtConfig({
modules: [
'nuxt-schema-org',
],
})
useHead({ script: [{ type: 'application/ld+json', innerHTML: '...' }] })
to add Schema.org nodes.Verifying Installation
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.
Other suggestions: