File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { ProductListingPage } from "@decocms/apps/commerce/types" ;
2+ import {
3+ BreadcrumbJsonLd ,
4+ PLPJsonLd ,
5+ } from "@decocms/apps/commerce/components/JsonLd" ;
26import { mapProductToAnalyticsItem } from "@decocms/apps/commerce/utils/productToAnalyticsItem" ;
37import { useId } from "react" ;
48import { useOffer } from "@decocms/apps/commerce/sdk/useOffer" ;
@@ -92,6 +96,9 @@ function Result({
9296 return (
9397 < div { ...viewItemListEvent } className = "w-full" >
9498 < div className = "container flex flex-col gap-4 sm:gap-5 w-full py-4 sm:py-5 px-5 sm:px-0" >
99+ { /* SEO: schema.org JSON-LD, server-rendered inline (crawlers read it anywhere in the document) */ }
100+ < PLPJsonLd page = { page } />
101+ { breadcrumb && < BreadcrumbJsonLd breadcrumb = { breadcrumb } /> }
95102 < Breadcrumb itemListElement = { breadcrumb ?. itemListElement } />
96103
97104 < SearchFilterDrawer id = { filterDrawerId } filters = { filters } baseUrl = { href } />
Original file line number Diff line number Diff line change 11import type { ProductDetailsPage } from "@decocms/apps/commerce/types" ;
2+ import {
3+ BreadcrumbJsonLd ,
4+ ProductJsonLd ,
5+ } from "@decocms/apps/commerce/components/JsonLd" ;
26import ProductHero , {
37 type HeroCopyConfig ,
48} from "../../components/product/pdp/ProductHero" ;
@@ -79,6 +83,9 @@ export default function ProductDetails({
7983
8084 return (
8185 < div className = "container flex flex-col gap-4 sm:gap-5 w-full py-4 sm:py-5 px-5 sm:px-0" >
86+ { /* SEO: schema.org JSON-LD, server-rendered inline (crawlers read it anywhere in the document) */ }
87+ < ProductJsonLd product = { page . product } />
88+ < BreadcrumbJsonLd breadcrumb = { page . breadcrumbList } />
8289 < Breadcrumb itemListElement = { page . breadcrumbList . itemListElement } />
8390 < ProductHero
8491 page = { page }
You can’t perform that action at this time.
0 commit comments