Skip to content

Commit

Permalink
fix ig
Browse files Browse the repository at this point in the history
  • Loading branch information
clxrityy committed Nov 14, 2024
1 parent 9751823 commit 7a9f4df
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/app/(main)/(routes)/posts/clxrity-xyz/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ import type { Metadata, ResolvedMetadata } from "next";

const post = mdxPosts[1];

export async function generateMetadata(parent: ResolvedMetadata): Promise<Metadata> {
const previousImages = (parent).openGraph?.images || [];
export async function generateMetadata(): Promise<Metadata> {

return {
title: post.title,
description: post.preview,
openGraph: {
images: [post.mainImage, ...previousImages]
images: [
{
url: post.mainImage,
width: 200,
height: 200
}
]
},
keywords: post.keywords
}
Expand Down

0 comments on commit 7a9f4df

Please sign in to comment.