feat: improve OpenGraph images

This commit is contained in:
Stefan Imhoff
2026-01-20 14:55:18 +01:00
parent 42bdd2a666
commit b2d42e28d8
177 changed files with 14 additions and 0 deletions

View File

@@ -30,6 +30,17 @@ const rssFooterXml = ` </channel>
<guid>${`${site.url}/${post.frontmatter.slug}/`}</guid>
<description><![CDATA[${post.frontmatter.description}]]></description>
<pubDate>${dateToISO(post.frontmatter.date)}</pubDate>
<enclosure url="${
site.url +
(post.frontmatter.cover
? post.frontmatter.cover.startsWith('/assets/images/cover/') &&
post.frontmatter.cover.endsWith('.webp')
? post.frontmatter.cover
.replace('/assets/images/cover/', '/assets/images/branding/og/')
.replace(/\.webp$/, '.jpg')
: post.frontmatter.cover
: '/assets/images/branding/og/bonsai.jpg')
}" length="0" type="image/jpeg" />
<content:encoded><![CDATA[`}
/>
<post.Content components={rssMapping} />