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:
parent
630b42a80e
commit
f8d9bf1905
@ -67,21 +67,20 @@ export async function generateMetadata(
|
||||
};
|
||||
}
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const posts = await getPosts();
|
||||
const locales = ["en", "fr", "zh-Hans"];
|
||||
// export async function generateStaticParams() {
|
||||
// const posts = await getPosts();
|
||||
// const locales = ["en", "fr", "zh-Hans"];
|
||||
|
||||
return posts.flatMap((post) =>
|
||||
locales.map((locale) => ({
|
||||
locale,
|
||||
slug: post.slug,
|
||||
})),
|
||||
);
|
||||
}
|
||||
// return posts.flatMap((post) =>
|
||||
// locales.map((locale) => ({
|
||||
// locale,
|
||||
// slug: post.slug,
|
||||
// })),
|
||||
// );
|
||||
// }
|
||||
|
||||
export default async function BlogPostPage({ params }: Props) {
|
||||
const { slug } = await params;
|
||||
// setRequestLocale(locale);
|
||||
const t = await getTranslations("blog");
|
||||
const post = await getPost(slug);
|
||||
const allPosts = await getPosts();
|
||||
|
Loading…
Reference in New Issue
Block a user