UNPKG

nuxt-schema-org

Version:

The quickest and easiest way to build Schema.org graphs for Nuxt.

51 lines (48 loc) 1.4 kB
import { NuxtModule } from '@nuxt/schema'; import { OrganizationSimple, PersonSimple, LocalBusinessSimple } from '@unhead/schema-org'; import { Script } from '@unhead/vue/types'; interface ModuleOptions { /** * Whether a default WebPage, WebSite and Identity node be created. */ defaults?: boolean; /** * The identity of the site. */ identity?: 'Person' | 'Organization' | 'LocalBusiness' | OrganizationSimple | PersonSimple | LocalBusinessSimple; /** * Whether the module should be loaded. * * @default true */ enabled: boolean; /** * Whether the output should be minified. * * @default `process.env.NODE_ENV === 'production'` */ minify: boolean; /** * Whether the output should be reactive or just use the initial SSR output. * * @default `process.dev || !nuxt.options.ssr` */ reactive: boolean; /** * Attributes to apply to the script tag containing the LD+JSON Schema.org snippet. * * By default, will apply an `id` of `schema-org-graph`. Set to `false` to apply no attributes. */ scriptAttributes?: Script | false; /** * Enables debug logs. * * @default false */ debug: boolean; } interface ModuleHooks { } declare const _default: NuxtModule<ModuleOptions>; export = _default; export type { ModuleHooks, ModuleOptions };