mirror of
https://github.com/Dokploy/website
synced 2025-06-26 18:16:01 +00:00
chore: disable static params generation for blog post page
This commit is contained in:
@@ -67,21 +67,20 @@ export async function generateMetadata(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function generateStaticParams() {
|
// export async function generateStaticParams() {
|
||||||
const posts = await getPosts();
|
// const posts = await getPosts();
|
||||||
const locales = ["en", "fr", "zh-Hans"];
|
// const locales = ["en", "fr", "zh-Hans"];
|
||||||
|
|
||||||
return posts.flatMap((post) =>
|
// return posts.flatMap((post) =>
|
||||||
locales.map((locale) => ({
|
// locales.map((locale) => ({
|
||||||
locale,
|
// locale,
|
||||||
slug: post.slug,
|
// slug: post.slug,
|
||||||
})),
|
// })),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
export default async function BlogPostPage({ params }: Props) {
|
export default async function BlogPostPage({ params }: Props) {
|
||||||
const { slug } = await params;
|
const { slug } = await params;
|
||||||
// setRequestLocale(locale);
|
|
||||||
const t = await getTranslations("blog");
|
const t = await getTranslations("blog");
|
||||||
const post = await getPost(slug);
|
const post = await getPost(slug);
|
||||||
const allPosts = await getPosts();
|
const allPosts = await getPosts();
|
||||||
|
|||||||
Reference in New Issue
Block a user