From bb6937771686c5500d2b3816691fc022c2576dd8 Mon Sep 17 00:00:00 2001 From: Ad-closeNN <1709301095@qq.com> Date: Sat, 25 Apr 2026 15:02:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8A=A0=E5=85=A5=E8=BF=87=E6=97=B6?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/posts/[...slug].astro | 54 +++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 215ddc3..253e6b5 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -30,6 +30,9 @@ interface Props { const { entry }: Props = Astro.props; const { Content, headings, remarkPluginFrontmatter } = await render(entry); const postSlug = entry.id; +const lastUpdatedAt = entry.data.updated ?? entry.data.published; +const lastUpdatedLabel = formatDateToYYYYMMDD(lastUpdatedAt); +const lastUpdatedTimestamp = lastUpdatedAt.getTime(); const jsonLd = { "@context": "https://schema.org", @@ -111,6 +114,16 @@ const customcover = entry.data.customcover; )} +