From b3c80b53b207f78981365e1838beaefd2def9648 Mon Sep 17 00:00:00 2001 From: abhu-A-J Date: Fri, 12 May 2023 16:08:03 +0530 Subject: [PATCH] feat: add a basic product ld schema on product details page --- app/product/[handle]/page.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index 612cd0236..5d8a4297f 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -58,8 +58,22 @@ export default async function ProductPage({ params }: { params: { handle: string if (!product) return notFound(); + const productJsonLd = { + '@context': 'https://schema.org', + '@type': 'Product', + name: product.title, + description: product.description, + image: product.featuredImage.url + }; + return (
+