From 87d728b0222a127c2b155dc727bb222a1016a3df Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 19 Dec 2024 23:11:13 +0800 Subject: [PATCH] :sparkles: Add twitter card attr --- src/pages/posts/[...slug].astro | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index dfe38e7..6ccdc02 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -47,10 +47,11 @@ const attachments = await fetchAttachmentMeta(data.body.attachments) } }} twitter={{ + card: "summary_large_image", title: data.body?.title ? data.body.title : `Post #${data.id}`, - description: data.body?.content, - creator: "@"+data.publisher.name, - image: data.body?.thumbnail ? getAttachmentUrl(data.body.thumbnail) : getAttachmentUrl(attachments.find(a => a.mimetype.startsWith('image'))?.rid), + description: data.body?.content, + creator: "@"+data.publisher.name, + image: data.body?.thumbnail ? getAttachmentUrl(data.body.thumbnail) : getAttachmentUrl(attachments.find(a => a.mimetype.startsWith('image'))?.rid), }} />