Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

Blog image (#3000)

Kenton Quatman05ea71bec8aa
diff --git a/apps/docsite/public/blog-post-01.png b/apps/docsite/public/blog-post-01.png
new file mode 100644
index 0000000000..25c0b95598
Binary files /dev/null and b/apps/docsite/public/blog-post-01.png differ
diff --git a/apps/docsite/src/components/blog/BlogArticle.tsx b/apps/docsite/src/components/blog/BlogArticle.tsx
index 19153d1dcd..538f01a4bc 100644
--- a/apps/docsite/src/components/blog/BlogArticle.tsx
+++ b/apps/docsite/src/components/blog/BlogArticle.tsx
@@ -19,6 +19,7 @@ import {Markdown} from '@xds/core/Markdown';
import {Text, Heading} from '@xds/core/Text';
import {VStack, HStack} from '@xds/core/Layout';
import {Grid} from '@xds/core/Grid';
+import {AspectRatio} from '@xds/core/AspectRatio';
import {Icon} from '@xds/core/Icon';
import {Section} from '@xds/core/Section';
import {Badge} from '@xds/core/Badge';
@@ -33,20 +34,22 @@ const styles = stylex.create({
section: {
marginInline: 'auto',
},
- // Neutral cover placeholder (cover generator deferred). Calm, theme-driven.
+ // Shared cover frame (calm, theme-driven). AspectRatio governs the ratio.
cover: {
- width: '100%',
- aspectRatio: '16 / 7',
borderRadius: 'var(--radius-container)',
backgroundColor: 'var(--color-background-muted)',
border: '1px solid var(--color-border)',
},
+ // Neutral placeholder shown when no cover image is provided.
+ coverPlaceholder: {
+ width: '100%',
+ aspectRatio: '16 / 9',
+ },
coverImg: {
width: '100%',
height: '100%',
objectFit: 'cover',
display: 'block',
- borderRadius: 'var(--radius-container)',
},
tagRow: {
flexWrap: 'wrap',
@@ -87,13 +90,18 @@ export function BlogArticle({post}: BlogArticleProps) {
{/* Cover — custom image when provided, else a neutral placeholder */}
{post.coverImage ? (
- <img
- src={post.coverImage}
- alt={post.coverAlt ?? ''}
- {...stylex.props(styles.cover, styles.coverImg)}
- />
+ <AspectRatio ratio={16 / 9} xstyle={styles.cover}>
+ <img
+ src={post.coverImage}
+ alt={post.coverAlt ?? ''}
+ {...stylex.props(styles.coverImg)}
+ />
+ </AspectRatio>
) : (
- <div {...stylex.props(styles.cover)} aria-hidden="true" />
+ <div
+ {...stylex.props(styles.cover, styles.coverPlaceholder)}
+ aria-hidden="true"
+ />
)}
{/* Body */}
diff --git a/apps/docsite/src/content/blog/posts/introducing-astryx.md b/apps/docsite/src/content/blog/posts/introducing-astryx.md
index 7fa3594be7..b1724d8a39 100644
--- a/apps/docsite/src/content/blog/posts/introducing-astryx.md
+++ b/apps/docsite/src/content/blog/posts/introducing-astryx.md
@@ -9,6 +9,8 @@ tags:
- 'Release'
- 'AI'
- 'Design systems'
+coverImage: '/blog-post-01.png'
+coverAlt: 'Introducing Astryx by Meta'
relatedDocs:
- title: 'Getting started'
href: '/docs/getting-started'