Skip to content

Commit 43fdcc9

Browse files
committed
fix(compare): use Thing instead of Product in JSON-LD
Google's Product rich-result validation requires offers/review/aggregateRating, none of which apply to benchmark subject GPUs. Switch the per-GPU item type to schema.org Thing — vendor/category move into additionalProperty so no crawl info is lost — and the validator warning goes away.
1 parent 5fc5c04 commit 43fdcc9

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

packages/app/src/lib/compare-ssr.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function pickString(value: string | string[] | undefined): string | undef
7575
}
7676

7777
// ---------------------------------------------------------------------------
78-
// Pair summary (JSON-LD Product additionalProperty)
78+
// Pair summary (JSON-LD additionalProperty)
7979
// ---------------------------------------------------------------------------
8080

8181
export interface PairSummary {
@@ -315,7 +315,7 @@ export function computeCompareImageRows(
315315
function jsonLdEntryFor(key: string, summary: PairSummary, position: number) {
316316
const meta = HW_REGISTRY[key];
317317
const label = meta?.label ?? key.toUpperCase();
318-
const props: { name: string; value: string | number }[] = [];
318+
const props: { name: string; value: string | number }[] = [{ name: 'Category', value: 'GPU' }];
319319
if (meta) {
320320
props.push({ name: 'Vendor', value: meta.vendor });
321321
props.push({ name: 'Architecture', value: meta.arch });
@@ -344,10 +344,8 @@ function jsonLdEntryFor(key: string, summary: PairSummary, position: number) {
344344
'@type': 'ListItem',
345345
position,
346346
item: {
347-
'@type': 'Product',
347+
'@type': 'Thing',
348348
name: label,
349-
brand: { '@type': 'Brand', name: meta?.vendor ?? 'Unknown' },
350-
category: 'GPU',
351349
...(props.length > 0 && {
352350
additionalProperty: props.map((p) => ({
353351
'@type': 'PropertyValue',

0 commit comments

Comments
 (0)