From de99732c19feec2475ecd4c1c0b7b31eb4d75709 Mon Sep 17 00:00:00 2001 From: KazooTTT Date: Thu, 30 Jan 2025 21:29:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=98=BE=E7=A4=BA=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/blog/Hero.astro | 14 ++++++++------ src/content/config.ts | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/blog/Hero.astro b/src/components/blog/Hero.astro index 817b149..a12adf1 100644 --- a/src/components/blog/Hero.astro +++ b/src/components/blog/Hero.astro @@ -13,8 +13,7 @@ interface Props { const { content: { data, render }, - simple = false, - socialImage + simple = false } = Astro.props const { remarkPluginFrontmatter } = await render() --- @@ -30,10 +29,8 @@ const { remarkPluginFrontmatter } = await render() /> ) -} -->{ - data.draft ? (Draft) : null -} - +} +-->

/{' '} @@ -49,6 +46,11 @@ const { remarkPluginFrontmatter } = await render() > + {data.date_modified ? ( + + ) : null} ) } diff --git a/src/content/config.ts b/src/content/config.ts index 072b82d..e882d42 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -24,7 +24,9 @@ const post = defineCollection({ category: z.string().optional().nullable(), finished: z.boolean().default(false), pinned: z.boolean().default(false), - projectUrl: z.string().optional() + projectUrl: z.string().optional(), + date_created: z.date().optional(), + date_modified: z.date().optional() }) })