Components: Schema
JSON-LD structured data for search engines: organisation, breadcrumbs, product, item lists and blog posts.
Generated from apps/theme/src/components/schema/: 7 files, 8 components. Import a component through the @/components/… path shown, so a fork can override it in src/custom/.
@/components/schema/blog-posting-schema
apps/theme/src/components/schema/blog-posting-schema.tsx server component
<BlogPostingSchema>
| Prop | Type | Description |
|---|---|---|
post | BlogPost | |
slug | string |
@/components/schema/breadcrumb-schema
apps/theme/src/components/schema/breadcrumb-schema.tsx server component
<BreadcrumbSchema>
| Prop | Type | Description |
|---|---|---|
items | BreadcrumbItem[] |
@/components/schema/item-list-schema
apps/theme/src/components/schema/item-list-schema.tsx server component
<ItemListSchema>
| Prop | Type | Description |
|---|---|---|
products | ProductInterface[] |
@/components/schema/json-ld
apps/theme/src/components/schema/json-ld.tsx server component
<JsonLd>
| Prop | Type | Description |
|---|---|---|
schema | WithContext<T> |
<JsonLdRaw>
Renders a pre-stringified JSON-LD payload — the two static, site-wide schemas built in lib/json-ld-content.ts.
It used to matter that the bytes here matched a sha256 source in the CSP exactly; that hash no longer exists (see the CSP block in next.config.ts for why hashes are not viable under the App Router), so nothing depends on this string being byte-identical to anything else. Which removes the only reason it was skipping the </script> escaping: it now goes through the same escapeJsonLd as every other payload. The inputs are build-time config rather than Magento data, so this is closing a latent footgun, not a live hole — but an unescaped HTML sink with no remaining justification is not worth keeping.
| Prop | Type | Description |
|---|---|---|
json | string |
@/components/schema/organization-schema
apps/theme/src/components/schema/organization-schema.tsx server component
<OrganizationSchema>
No props.
@/components/schema/product-schema
apps/theme/src/components/schema/product-schema.tsx server component
<ProductSchema>
| Prop | Type | Description |
|---|---|---|
product | ProductInterface | |
slug | string | |
reviewItems? | ProductReview[] | Individual reviews for the JSON-LD review array. Passed explicitly because reviews are fetched in the deferred relations query, not the main product query. Falls back to product.reviews?.items for callers that still embed reviews on the product. The aggregateRating always comes from the product's review_count / rating_summary. |
@/components/schema/website-schema
apps/theme/src/components/schema/website-schema.tsx server component
<WebSiteSchema>
| Prop | Type | Description |
|---|---|---|
locale | string |