Skip to content

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>

PropTypeDescription
postBlogPost
slugstring

@/components/schema/breadcrumb-schema

apps/theme/src/components/schema/breadcrumb-schema.tsx server component

<BreadcrumbSchema>

PropTypeDescription
itemsBreadcrumbItem[]

@/components/schema/item-list-schema

apps/theme/src/components/schema/item-list-schema.tsx server component

<ItemListSchema>

PropTypeDescription
productsProductInterface[]

@/components/schema/json-ld

apps/theme/src/components/schema/json-ld.tsx server component

<JsonLd>

PropTypeDescription
schemaWithContext<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.

PropTypeDescription
jsonstring

@/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>

PropTypeDescription
productProductInterface
slugstring
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>

PropTypeDescription
localestring