From 80fcc939540f9c05c3d91917587c6ef5fb612718 Mon Sep 17 00:00:00 2001 From: tanishqmanuja Date: Wed, 20 Sep 2023 15:09:24 +0530 Subject: [PATCH] feat: use post author in og template --- src/utils/og-templates/post.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/og-templates/post.tsx b/src/utils/og-templates/post.tsx index 480645c..a0dcf60 100644 --- a/src/utils/og-templates/post.tsx +++ b/src/utils/og-templates/post.tsx @@ -1,6 +1,7 @@ import { SITE } from "@config"; +import type { CollectionEntry } from "astro:content"; -export default (text: string) => { +export default (post: CollectionEntry<"blog">) => { return (
{ overflow: "hidden", }} > - {text} + {post.data.title}

{ " - {SITE.author} + {post.data.author}