nuxt-x-schema
WebSite
Schema.org WebSite JSON-LD component for site identity and Sitelinks Search Box structured data.
WebSite
The XSchemaWebSite component injects a <script type="application/ld+json"> tag for website identity structured data. No visible output — SEO only.
Components
<XSchemaWebSite />
Use on your homepage or global layout to declare site identity. Enable the enableSearchBox prop to add a Sitelinks Search Box potentialAction for Google Search.
<XSchemaWebSite
name="My Website"
url="https://example.com"
:enable-search-box="true"
search-url="https://example.com/search?q={search_term_string}"
/>
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
name | String | Yes | — | Website name |
url | String | Yes | — | Website URL |
description | String | No | — | Website description |
publisher | Organization | No | — | Publisher Organization object |
enableSearchBox | boolean | No | false | Add Sitelinks Search Box potentialAction |
searchUrl | String | No | — | Search URL template; required when enableSearchBox is true |
queryInput | String | No | "required name=search_term_string" | query-input value for the SearchAction |
AI Context
component: XSchemaWebSite
package: "@xenterprises/nuxt-x-schema"
output: JSON-LD script tag in <head>
use-when: Adding WebSite structured data on the homepage or global layout to declare site identity
place: Homepage or global layout — typically placed once per site
notes:
- Renderless component — no visible DOM output; purely SEO metadata
- Injects JSON-LD server-side via useHead — SSR-safe, visible to crawlers on first paint
- enableSearchBox=true adds a Sitelinks Search Box potentialAction; requires searchUrl
- searchUrl template must include {search_term_string} placeholder
