Skip to content

Commit

Permalink
fix: missing some metadata tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantotone committed Jan 30, 2024
1 parent c87c392 commit f9d7e7d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/article/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export async function generateStaticParams() {

export async function generateMetadata({params}: Props, parent: ResolvingMetadata): Promise<Metadata> {
const article = await getArticle(params.slug);
const previousImages = (await parent).openGraph?.images || [];
const mainMetadata = await parent;
const previousImages = mainMetadata.openGraph?.images || [];

const maxCharacters = 200;
const description = markdownToTxt(article.content).substring(0, maxCharacters) + "...";
Expand All @@ -38,10 +39,15 @@ export async function generateMetadata({params}: Props, parent: ResolvingMetadat
description,

openGraph: {
siteName: "YARG | Yet Another Rhythm Game",
type: "article",
title: article.title,
images
},

twitter: {
site: "@YARGGame",
title: article.title,
description,
images
}
Expand Down

0 comments on commit f9d7e7d

Please sign in to comment.