X Enterprises
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

PropTypeRequiredDefaultDescription
nameStringYesWebsite name
urlStringYesWebsite URL
descriptionStringNoWebsite description
publisherOrganizationNoPublisher Organization object
enableSearchBoxbooleanNofalseAdd Sitelinks Search Box potentialAction
searchUrlStringNoSearch URL template; required when enableSearchBox is true
queryInputStringNo"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
Copyright © 2026