diff --git a/src/app/(home)/story/page.tsx b/src/app/(home)/story/page.tsx index c0e7e62..96f5015 100644 --- a/src/app/(home)/story/page.tsx +++ b/src/app/(home)/story/page.tsx @@ -16,7 +16,6 @@ import Link from "next/link"; import { NRenderer } from "@/components/notion/renderer"; import { Metadata, ResolvingMetadata } from "next"; import Comments, { Reactions } from "@/components/comments"; -import { Stats } from "./stats"; export const revalidate = 100; @@ -26,7 +25,7 @@ type Props = { export async function generateMetadata( { searchParams }: Props, - parent: ResolvingMetadata, + // parent: ResolvingMetadata, ): Promise { const notion = new NotionAPI(); @@ -60,10 +59,36 @@ export async function generateMetadata( title: title, description: description.toString() || "Written by raj", openGraph: { - images: [og_image_url.toString()], + images: [ + { + url: og_image_url.toString(), + type: "image/jpeg", + height: 630, + width: 1200, + }, + ], + authors: [author.toString()], }, + authors: [ + { + name: author.toString(), + }, + ], + twitter: { - images: [og_image_url.toString()], + images: [ + { + url: og_image_url.toString(), + type: "image/jpeg", + height: 630, + width: 1200, + }, + ], + creator: author.toString(), + card: "summary_large_image", + title: title, + description: description.toString() || "Written by raj", + site: "raj.how", }, }; } @@ -88,8 +113,6 @@ export default async function Story({ const category = process.env.COMMENTS_CATEGORY; const categoryId = process.env.COMMENTS_CATEGORY_ID; - console.log(repo, repoId, category, categoryId); - return (
og -
+
{title?.toString()} @@ -45,9 +50,9 @@ export async function GET(props: NextRequest) {
- {images ? ( + {images && images?.split(",")[0].trim() ? ( ), { - width: 1200 / 2, - height: 630 / 2, + width, + height, + headers: { + "Content-Type": "image/jpeg", + "content-type": "image/jpeg", + }, }, ); }