Skip to content

Commit 86d772e

Browse files
juristrFrozenPandaz
authored andcommittedFeb 6, 2025
fix(nx-dev): update blog metadata to include the post descriptions
(cherry picked from commit 247dc29)
1 parent f12b417 commit 86d772e

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed
 

Diff for: ‎nx-dev/nx-dev/app/blog/[slug]/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function generateMetadata(
1717

1818
return {
1919
title: `${post.title} | Nx Blog`,
20-
description: 'Latest news from the Nx & Nx Cloud core team',
20+
description: post.description,
2121
openGraph: {
2222
url: `https://nx.dev/blog/${slug}`,
2323
title: post.title,

Diff for: ‎nx-dev/ui-blog/src/lib/blog-details.tsx

+1-25
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,6 @@ export interface BlogDetailsProps {
1111
post: BlogPostDataEntry;
1212
}
1313

14-
export async function generateMetadata({ post }: BlogDetailsProps) {
15-
return {
16-
title: post.title,
17-
description: post.description,
18-
openGraph: {
19-
images: [
20-
{
21-
url: post.cover_image
22-
? `https://nx.dev${post.cover_image}`
23-
: 'https://nx.dev/socials/nx-media.png',
24-
width: 800,
25-
height: 421,
26-
alt: 'Nx: Smart Monorepos · Fast CI',
27-
type: 'image/jpeg',
28-
},
29-
],
30-
},
31-
};
32-
}
33-
3414
export function BlogDetails({ post }: BlogDetailsProps) {
3515
const { node } = renderMarkdown(post.content, {
3616
filePath: post.filePath ?? '',
@@ -79,11 +59,7 @@ export function BlogDetails({ post }: BlogDetailsProps) {
7959
</div>
8060
) : post.youtubeUrl ? (
8161
<div className="mx-auto mb-16 w-full max-w-screen-md">
82-
<YouTube
83-
src={post.youtubeUrl}
84-
title={post.title}
85-
caption={post.description}
86-
/>
62+
<YouTube src={post.youtubeUrl} title={post.title} />
8763
</div>
8864
) : (
8965
post.cover_image && (

0 commit comments

Comments
 (0)
Please sign in to comment.