v6.0.0
Introduction
The v6 major of Nuxt Schema.org adds a new content composable, fixes SSR memory leaks, resolves @id URL generation issues, and migrates the devtools to the shared nuxtseo infrastructure.
鈿狅笍 Breaking Changes
Site Config v4
Nuxt Site Config is a module used internally by Nuxt Schema.org.
Its major update to v4.0.0 shouldn't have any direct effect on your site, however, you may want to double check the breaking changes.
Devtools Rewrite
The devtools panel has been migrated to the shared nuxtseo-shared infrastructure. The UI has been cleaned up and now includes a schema validator, debug view, raw JSON view, and documentation links. If you relied on the previous devtools layout, the information is still available under new navigation tabs.
馃殌 Features
defineSchemaOrgSchema() Composable
A new composable for @nuxt/content v3 that simplifies adding Schema.org fields to your content schema.
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { defineSchemaOrgSchema } from 'nuxt-schema-org/content'
import { z } from 'zod'
export default defineContentConfig({
collections: {
pages: defineCollection({
type: 'page',
source: '**/*.md',
schema: z.object({
schemaOrg: defineSchemaOrgSchema(),
}),
}),
},
})This replaces the previous asSchemaOrgCollection() helper, which is now deprecated.
馃敡 Bug Fixes
SSR Memory Leak from Reactive Scopes
Reactive scopes created during SSR were not being disposed, causing memory to accumulate across requests. The plugin now resolves paths directly on the server without creating computed refs, avoiding leaked reactive watchers entirely.
@id URLs Now Respect app.baseURL
All defineXYZ helpers (e.g. defineWebPage, defineOrganization) now correctly include app.baseURL when generating @id values. Previously, sites deployed under a base path (e.g. /docs/) would produce @id URLs missing that prefix.
Nuxt Context Preserved in Computed Refs
Passing a computed ref to useSchemaOrg() could trigger "useNuxtApp() called outside of setup" errors when Unhead later evaluated the getter. The composable now wraps ref inputs with runWithContext() to preserve the Nuxt async context.