Nuxt Hooks
Learn how to use Nuxt hooks to modify your Schema.org output.
schema-org:meta
Type: async (config: ModuleOptions) => void | Promise<void>
You can hook into the generation of the meta-data used to generate the Schema.org data.
For example, this can be useful for dynamically changing the host.
import { defineNuxtPlugin } from '#app'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.hooks.hook('schema-org:meta', (meta) => {
if (nuxtApp._route.path === '/plugin-override') {
meta.host = 'https://override-example.com'
meta.url = `${meta.host}${meta.path}`
}
})
})
Nuxt Config
Configure the sitemap module.
v2.0.0
Release notes for v2.0.0.
Community
Ecosystem