mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 14:05:05 +08:00
fix(www): inline brand Organization on pricing Product schema
Replaces dangling @id reference (resolved only on the homepage's Organization node) with an inline Organization object so Google's Product rich-results validator can resolve brand without cross-page context. Also renames markdownAnswerToText to stripMarkdownLinks to match what the helper actually does.
This commit is contained in:
@@ -128,7 +128,7 @@ interface FaqEntry {
|
||||
answer: string
|
||||
}
|
||||
|
||||
function markdownAnswerToText(markdown: string): string {
|
||||
function stripMarkdownLinks(markdown: string): string {
|
||||
return markdown.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1').trim()
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ export function faqPageSchema(entries: FaqEntry[]) {
|
||||
name: entry.question,
|
||||
acceptedAnswer: {
|
||||
'@type': 'Answer',
|
||||
text: markdownAnswerToText(entry.answer),
|
||||
text: stripMarkdownLinks(entry.answer),
|
||||
},
|
||||
})),
|
||||
}
|
||||
@@ -195,7 +195,10 @@ export function pricingProductSchema(input: PricingProductSchemaInput) {
|
||||
description: input.description,
|
||||
image: input.image,
|
||||
url: input.url,
|
||||
brand: { '@id': ORG_ID },
|
||||
brand: {
|
||||
'@type': 'Organization',
|
||||
name: SITE_NAME,
|
||||
},
|
||||
offers,
|
||||
...(customPlans.length > 0 && {
|
||||
additionalProperty: customPlans.map((plan) => ({
|
||||
|
||||
Reference in New Issue
Block a user