@@ -22,50 +22,50 @@ type Props = {
2222 params : { locale : string ; slug : string } ;
2323} ;
2424
25- export async function generateMetadata (
26- { params } : Props ,
27- parent : ResolvingMetadata ,
28- ) : Promise < Metadata > {
29- const { locale, slug } = await params ;
30- const post = await getPost ( slug ) ;
25+ // export async function generateMetadata(
26+ // { params }: Props,
27+ // parent: ResolvingMetadata,
28+ // ): Promise<Metadata> {
29+ // const { locale, slug } = await params;
30+ // const post = await getPost(slug);
3131
32- if ( ! post ) {
33- return {
34- title : "Post Not Found" ,
35- } ;
36- }
32+ // if (!post) {
33+ // return {
34+ // title: "Post Not Found",
35+ // };
36+ // }
3737
38- const ogUrl = new URL (
39- `/${ locale } /api/og` ,
40- process . env . NEXT_PUBLIC_APP_URL || "http://localhost:3000" ,
41- ) ;
42- ogUrl . searchParams . set ( "slug" , slug ) ;
38+ // const ogUrl = new URL(
39+ // `/${locale}/api/og`,
40+ // process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000",
41+ // );
42+ // ogUrl.searchParams.set("slug", slug);
4343
44- return {
45- title : post . title ,
46- description : post . custom_excerpt || post . excerpt ,
47- openGraph : {
48- title : post . title ,
49- description : post . custom_excerpt || post . excerpt ,
50- type : "article" ,
51- url : `${ process . env . NEXT_PUBLIC_APP_URL } /blog/${ post . slug } ` ,
52- images : [
53- {
54- url : ogUrl . toString ( ) ,
55- width : 1200 ,
56- height : 630 ,
57- alt : post . title ,
58- } ,
59- ] ,
60- } ,
61- twitter : {
62- card : "summary_large_image" ,
63- title : post . title ,
64- description : post . custom_excerpt || post . excerpt ,
65- images : [ ogUrl . toString ( ) ] ,
66- } ,
67- } ;
68- }
44+ // return {
45+ // title: post.title,
46+ // description: post.custom_excerpt || post.excerpt,
47+ // openGraph: {
48+ // title: post.title,
49+ // description: post.custom_excerpt || post.excerpt,
50+ // type: "article",
51+ // url: `${process.env.NEXT_PUBLIC_APP_URL}/blog/${post.slug}`,
52+ // images: [
53+ // {
54+ // url: ogUrl.toString(),
55+ // width: 1200,
56+ // height: 630,
57+ // alt: post.title,
58+ // },
59+ // ],
60+ // },
61+ // twitter: {
62+ // card: "summary_large_image",
63+ // title: post.title,
64+ // description: post.custom_excerpt || post.excerpt,
65+ // images: [ogUrl.toString()],
66+ // },
67+ // };
68+ // }
6969
7070export async function generateStaticParams ( ) {
7171 const posts = await getPosts ( ) ;
0 commit comments