The module exposes the officially supported nodes from Unhead Schema.org. Official nodes are ones that have a direct impact on Google Rich Results.
Custom Nodes
If you need to add a node that isn't implemented, then you can provide it yourself.
Custom nodes are just plain objects that follow the Schema.org specification.
If you'd like to add types, you can use schema-dts.
<script lang="ts" setup>
useSchemaOrg([
{
'@type': 'DefinedTerm',
'name': 'Nuxt Schema.org',
'description': 'Nuxt Schema.org is a Nuxt module for adding Schema.org to your Nuxt app.',
'inDefinedTermSet': {
'@type': 'DefinedTermSet',
'name': 'Nuxt Modules',
},
}
])
</script>
<script lang="ts" setup>
import type { DefinedTerm } from 'schema-dts'
const NuxtSchemaOrgDefinedTerm: DefinedTerm = {
'@type': 'DefinedTerm',
'name': 'Nuxt Schema.org',
'description': 'Nuxt Schema.org is a Nuxt module for adding Schema.org to your Nuxt app.',
'inDefinedTermSet': {
'@type': 'DefinedTermSet',
'name': 'Nuxt Modules',
},
}
useSchemaOrg([NuxtSchemaOrgDefinedTerm])
</script>
Official nodes
The scope for officially supported nodes is those that provide Rich Results within Google.
Did this page help you?