Skip to content

Commit

Permalink
fix(nx-dev): update blog metadata to include the post descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
juristr committed Feb 1, 2025
1 parent 5ca1e23 commit 1de5953
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion nx-dev/nx-dev/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function generateMetadata(

return {
title: `${post.title} | Nx Blog`,
description: 'Latest news from the Nx & Nx Cloud core team',
description: post.description,
openGraph: {
url: `https://nx.dev/blog/${slug}`,
title: post.title,
Expand Down
20 changes: 0 additions & 20 deletions nx-dev/ui-blog/src/lib/blog-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ export interface BlogDetailsProps {
post: BlogPostDataEntry;
}

export async function generateMetadata({ post }: BlogDetailsProps) {
return {
title: post.title,
description: post.description,
openGraph: {
images: [
{
url: post.cover_image
? `https://nx.dev${post.cover_image}`
: 'https://nx.dev/socials/nx-media.png',
width: 800,
height: 421,
alt: 'Nx: Smart Monorepos · Fast CI',
type: 'image/jpeg',
},
],
},
};
}

export function BlogDetails({ post }: BlogDetailsProps) {
const { node } = renderMarkdown(post.content, {
filePath: post.filePath ?? '',
Expand Down

0 comments on commit 1de5953

Please sign in to comment.