Schema.org
Getting Started

Install Nuxt Schema.org

Get started with Nuxt Schema.org by installing the dependency to your project.

Recommendations

SSR is highly recommended for Nuxt Schema.org.

Ensure you haven't disabled SSR using ssr: false in your nuxt.config.

Setup

  1. Install nuxt-schema-org dependency to your project:
pnpm i -D nuxt-schema-org
  1. Add it to your modules section in your nuxt.config:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-schema-org']
})
  1. Configure your site details.

It's recommended to set a canonical site URL to avoid duplicate content issues, as well as a site name for better default configuration.

The easiest way to add it in your nuxt.config:

nuxt.config.ts
export default defineNuxtConfig({
  site: {
    url: 'https://example.com',
    name: 'My Website',
  }
})

To learn about other ways to configure your site config, head over to the Nuxt Site Config docs.

Next steps

That's it!

By default, the module will insert default Schema.org nodes for you, learn more about the Default Schema.org setup.