From 27c319429552ecd5d2cb06bf981294b53a4a052d Mon Sep 17 00:00:00 2001 From: igoramf Date: Fri, 3 Jul 2026 15:46:29 -0300 Subject: [PATCH 1/2] fix(seo): set og:type=product on product detail pages SeoPDPV2 was inheriting og:type from site-level config (usually "website"). Adds "product" to OGType union and explicitly sets type="product" in the SeoPDPV2 loader so PDPs emit the correct Open Graph type. Co-Authored-By: Claude Sonnet 4.6 --- commerce/sections/Seo/SeoPDPV2.tsx | 1 + website/components/Seo.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commerce/sections/Seo/SeoPDPV2.tsx b/commerce/sections/Seo/SeoPDPV2.tsx index 573f359c7..0e74b0ca5 100644 --- a/commerce/sections/Seo/SeoPDPV2.tsx +++ b/commerce/sections/Seo/SeoPDPV2.tsx @@ -75,6 +75,7 @@ export function loader(_props: Props, _req: Request, ctx: AppContext) { canonical, noIndexing, jsonLDs, + type: "product" as const, }; } diff --git a/website/components/Seo.tsx b/website/components/Seo.tsx index 08c17a04e..3133c9a4d 100644 --- a/website/components/Seo.tsx +++ b/website/components/Seo.tsx @@ -7,7 +7,7 @@ export const renderTemplateString = (template: string, value: string) => template.replace("%s", value); export type SEOSection = JSX.Element; -export type OGType = "website" | "article"; +export type OGType = "website" | "article" | "product"; export interface Props { title?: string; From 9cca3c95f351b0907385e30285da64f3d5458db5 Mon Sep 17 00:00:00 2001 From: igoramf Date: Fri, 3 Jul 2026 15:50:53 -0300 Subject: [PATCH 2/2] fix(seo): set og:type=product on product detail pages Adds "product" to OGType union and exposes type as a configurable prop in SeoPDPV2 so admins can override per section. Defaults to "product" since site-level config spreads "website" to all pages. Co-Authored-By: Claude Sonnet 4.6 --- commerce/sections/Seo/SeoPDPV2.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/commerce/sections/Seo/SeoPDPV2.tsx b/commerce/sections/Seo/SeoPDPV2.tsx index 0e74b0ca5..f96ae35a0 100644 --- a/commerce/sections/Seo/SeoPDPV2.tsx +++ b/commerce/sections/Seo/SeoPDPV2.tsx @@ -1,5 +1,6 @@ import Seo from "../../../website/components/Seo.tsx"; import { + OGType, renderTemplateString, SEOSection, } from "../../../website/components/Seo.tsx"; @@ -25,6 +26,11 @@ export interface Props { * @description By default, Structured Data is sent to everyone. Use this to prevent Structured Data from being sent to your customers, it will still be sent to crawlers and bots. Be aware that some integrations may not work if Structured Data is not sent. */ ignoreStructuredData?: boolean; + /** + * @title OG Type + * @default product + */ + type?: OGType; } /** @title Product details */ @@ -41,6 +47,7 @@ export function loader(_props: Props, _req: Request, ctx: AppContext) { jsonLD, omitVariants, ignoreStructuredData, + type: typeProp, } = props; const title = renderTemplateString( @@ -75,7 +82,7 @@ export function loader(_props: Props, _req: Request, ctx: AppContext) { canonical, noIndexing, jsonLDs, - type: "product" as const, + type: typeProp ?? "product", }; }