improvement(integrations): overhaul landing FAQs for SEO/GEO and fix dynamic OG images (#4985)

* improvement(integrations): overhaul landing FAQs for SEO/GEO and fix dynamic OG images

* improvement(integrations): trim comments and fold catalog updatedAt into integrations.json

* fix(integrations): correct FAQ copy for zero-capability and single-tool integrations
This commit is contained in:
Waleed
2026-06-11 17:54:58 -07:00
committed by GitHub
parent 9ab64e55e3
commit 977467970c
17 changed files with 17098 additions and 16908 deletions
+21 -8
View File
@@ -851,14 +851,27 @@ async function writeIntegrationsJson(iconMapping: Record<string, string>): Promi
// JSON formatter inlines short arrays of primitive strings. Pre-collapse those
// arrays here so the emitted file is already in Biome's canonical shape and
// `bun run check` does not churn it on every commit.
const json = JSON.stringify(integrations, null, 2).replace(
/\[\n(\s+"[^"\n]*"(?:,\n\s+"[^"\n]*")*)\n\s+\]/g,
(_match, inner) => {
const items = (inner as string).split(',\n').map((s: string) => s.trim())
return `[${items.join(', ')}]`
}
)
fs.writeFileSync(jsonPath, `${json}\n`)
const serialize = (value: unknown) =>
JSON.stringify(value, null, 2).replace(
/\[\n(\s+"[^"\n]*"(?:,\n\s+"[^"\n]*")*)\n\s+\]/g,
(_match, inner) => {
const items = (inner as string).split(',\n').map((s: string) => s.trim())
return `[${items.join(', ')}]`
}
)
// `updatedAt` is re-stamped only when the integrations content actually
// changes, so sitemap/JSON-LD freshness never churns on no-op regens.
const previous = fs.existsSync(jsonPath)
? (JSON.parse(fs.readFileSync(jsonPath, 'utf-8')) as { integrations?: unknown })
: null
if (previous?.integrations && serialize(previous.integrations) === serialize(integrations)) {
console.log(`✓ Integration data unchanged: ${integrations.length} integrations → ${jsonPath}`)
return
}
const updatedAt = new Date().toISOString().slice(0, 10)
fs.writeFileSync(jsonPath, `${serialize({ updatedAt, integrations })}\n`)
console.log(`✓ Integration data written: ${integrations.length} integrations → ${jsonPath}`)
} catch (error) {
// Surface taxonomy violations (missing/invalid `integrationType`) loudly —