diff --git a/commerce/sections/Seo/SeoPDPV2.tsx b/commerce/sections/Seo/SeoPDPV2.tsx index 573f359c7..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,6 +82,7 @@ export function loader(_props: Props, _req: Request, ctx: AppContext) { canonical, noIndexing, jsonLDs, + type: typeProp ?? "product", }; } 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;