Skip to content

Commit 3ee9a41

Browse files
gmoonclaude
andcommitted
Add comprehension debt blog post with custom OG image and inline diagram
- New post-005: "Comprehension Debt Is an Infrastructure Problem" - Per-post ogImage field plumbed through prerender (defaults to og-default.png) - Custom OG card (1200x630 PNG) and inline specs-as-docs-vs-graph diagram - Remove duplicate "Get Started" nav link; keep only the CTA button on home and blog headers Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c3e5f79 commit 3ee9a41

7 files changed

Lines changed: 329 additions & 10 deletions

File tree

55.6 KB
Loading
Lines changed: 48 additions & 0 deletions
Loading
Lines changed: 86 additions & 0 deletions
Loading

scripts/prerender.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ interface RouteMeta {
2121
title: string
2222
description: string
2323
canonical: string
24+
ogImage?: string
2425
}
2526

2627
const routes: RouteMeta[] = [
@@ -35,6 +36,7 @@ const routes: RouteMeta[] = [
3536
title: `${post.title} — Forkzero`,
3637
description: post.excerpt,
3738
canonical: `https://forkzero.ai/blog/${post.slug}`,
39+
ogImage: post.ogImage,
3840
})),
3941
{
4042
path: '/getting-started',
@@ -80,18 +82,21 @@ for (const route of routes) {
8082
// og:type — 'article' only for /blog/{slug}, 'website' for everything else
8183
const ogType = /^\/blog\/.+/.test(route.path) ? 'article' : 'website'
8284

85+
// og:image — per-route override, otherwise site default
86+
const ogImageUrl = `https://forkzero.ai${route.ogImage ?? '/og-default.png'}`
87+
8388
// Add OG tags and canonical
8489
const seoTags = [
8590
`<meta property="og:title" content="${escapeAttr(route.title)}" />`,
8691
`<meta property="og:description" content="${escapeAttr(route.description)}" />`,
8792
`<meta property="og:type" content="${ogType}" />`,
8893
`<meta property="og:url" content="${route.canonical}" />`,
89-
`<meta property="og:image" content="https://forkzero.ai/og-default.png" />`,
94+
`<meta property="og:image" content="${ogImageUrl}" />`,
9095
`<meta property="og:site_name" content="Forkzero" />`,
9196
`<meta name="twitter:card" content="summary_large_image" />`,
9297
`<meta name="twitter:title" content="${escapeAttr(route.title)}" />`,
9398
`<meta name="twitter:description" content="${escapeAttr(route.description)}" />`,
94-
`<meta name="twitter:image" content="https://forkzero.ai/og-default.png" />`,
99+
`<meta name="twitter:image" content="${ogImageUrl}" />`,
95100
`<link rel="canonical" href="${route.canonical}" />`,
96101
].join('\n ')
97102

0 commit comments

Comments
 (0)