Schema.org
Guides
Setup Identity
Set up Schema.org on your Nuxt app quickly.
By default, a Nuxt plugin is registered in your app that will register the root nodes for a
WebSite
and WebPage
for you.
These are configured using Nuxt Site Config,
The only configuration you may need to provide is the identity of your site.
Selecting An Identity
Beforehand you'll need to decide on what type of identity you want to use.
You can use either Organisation or Person, learn more about their differences on the Choosing an identity docs.
Setup
The simplest way to set up your identity is to set it in your nuxt.config
using a string:
nuxt.config.ts
export default defineNuxtConfig({
schemaOrg: {
identity: 'Organization' // or 'Person'
}
})
For more complex configurations, you can provide an object with the type
:
nuxt.config.ts
export default defineNuxtConfig({
schemaOrg: {
identity: {
type: 'Organization',
name: 'My Company',
url: 'https://example.com',
logo: 'https://example.com/logo.png'
}
}
})