Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@tanstack/svelte-query": "^6.3.9",
"@tanstack/vue-query": "^5.105.3",
"@types/node": "^26.6.6",
"blume": "^2.2.6",
"blume": "^2.2.7",
"effect": "^4.1.2",
"pino": "^10.4.0",
"superjson": "^2.2.6",
Expand Down
8 changes: 7 additions & 1 deletion apps/content/pages/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const dateFormat = new Intl.DateTimeFormat('en-US', { dateStyle: 'long' })
// PageLayout's own graph would describe the post as a second, TechArticle
// node, so it is turned off below.
const siteBase = (config.site ?? '').replace(/\/$/, '')
// PageLayout only derives the generated OG card for static routes, not for a
// dynamic one like this, though Blume renders a card for every blog entry.
const ogImage = siteBase && config.og.enabled ? `${siteBase}/og${route.path}.png` : undefined
const postJsonLd = {
'@context': 'https://schema.org',
'@type': 'BlogPosting',
Expand All @@ -82,7 +85,7 @@ const postJsonLd = {
'mainEntityOfPage': `${siteBase}${route.path}`,
...(date ? { datePublished: date.toISOString() } : {}),
...(tags.length > 0 ? { keywords: tags.join(', ') } : {}),
...(siteBase ? { image: `${siteBase}/og${route.path}.png` } : {}),
...(ogImage ? { image: ogImage } : {}),
...(authors.length > 0
? {
author: authors.map(author => ({
Expand All @@ -107,6 +110,9 @@ const postJsonLd = {
searchEnabled={config.search.enabled}
siteUrl={config.site}
ogEnabled={config.og.enabled}
ogImage={ogImage}
ogImageAlt={entry.data.title}
ogImageSize={{ width: 1200, height: 630 }}
page={{ title: `${entry.data.title} - ${config.title}`, description: entry.data.description, route: route.path }}
structuredDataEnabled={false}
x={config.x}
Expand Down
Loading
Loading