mirror of
https://github.com/Dokploy/website
synced 2025-06-26 18:16:01 +00:00
chore: temporarily disable blog post metadata generation
This commit is contained in:
@@ -22,50 +22,50 @@ type Props = {
|
|||||||
params: { locale: string; slug: string };
|
params: { locale: string; slug: string };
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function generateMetadata(
|
// export async function generateMetadata(
|
||||||
{ params }: Props,
|
// { params }: Props,
|
||||||
parent: ResolvingMetadata,
|
// parent: ResolvingMetadata,
|
||||||
): Promise<Metadata> {
|
// ): Promise<Metadata> {
|
||||||
const { locale, slug } = await params;
|
// const { locale, slug } = await params;
|
||||||
const post = await getPost(slug);
|
// const post = await getPost(slug);
|
||||||
|
|
||||||
if (!post) {
|
// if (!post) {
|
||||||
return {
|
// return {
|
||||||
title: "Post Not Found",
|
// title: "Post Not Found",
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
|
|
||||||
const ogUrl = new URL(
|
// const ogUrl = new URL(
|
||||||
`/${locale}/api/og`,
|
// `/${locale}/api/og`,
|
||||||
process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000",
|
// process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000",
|
||||||
);
|
// );
|
||||||
ogUrl.searchParams.set("slug", slug);
|
// ogUrl.searchParams.set("slug", slug);
|
||||||
|
|
||||||
return {
|
// return {
|
||||||
title: post.title,
|
// title: post.title,
|
||||||
description: post.custom_excerpt || post.excerpt,
|
// description: post.custom_excerpt || post.excerpt,
|
||||||
openGraph: {
|
// openGraph: {
|
||||||
title: post.title,
|
// title: post.title,
|
||||||
description: post.custom_excerpt || post.excerpt,
|
// description: post.custom_excerpt || post.excerpt,
|
||||||
type: "article",
|
// type: "article",
|
||||||
url: `${process.env.NEXT_PUBLIC_APP_URL}/blog/${post.slug}`,
|
// url: `${process.env.NEXT_PUBLIC_APP_URL}/blog/${post.slug}`,
|
||||||
images: [
|
// images: [
|
||||||
{
|
// {
|
||||||
url: ogUrl.toString(),
|
// url: ogUrl.toString(),
|
||||||
width: 1200,
|
// width: 1200,
|
||||||
height: 630,
|
// height: 630,
|
||||||
alt: post.title,
|
// alt: post.title,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
twitter: {
|
// twitter: {
|
||||||
card: "summary_large_image",
|
// card: "summary_large_image",
|
||||||
title: post.title,
|
// title: post.title,
|
||||||
description: post.custom_excerpt || post.excerpt,
|
// description: post.custom_excerpt || post.excerpt,
|
||||||
images: [ogUrl.toString()],
|
// images: [ogUrl.toString()],
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
|
|
||||||
export async function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
const posts = await getPosts();
|
const posts = await getPosts();
|
||||||
|
|||||||
Reference in New Issue
Block a user