feat: add post update date (#243)

* feat: Add article update date

* feat:
1.Hide update time on the homepage;
2.Replace update icon;

* remove iconify-json/mdi

---------

Co-authored-by: liangjianhao <jianhao.liang@sz-sanjiang.com>
This commit is contained in:
kinho
2024-12-04 19:29:35 +08:00
committed by GitHub
parent 079abbc965
commit b604cdf18c
6 changed files with 22 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ let delay = 0
const interval = 50
---
<div class="transition flex flex-col rounded-[var(--radius-large)] bg-[var(--card-bg)] py-1 md:py-0 md:bg-transparent md:gap-4 mb-4">
{page.data.map((entry: { data: { draft: boolean; title: string; tags: string[]; category: string; published: Date; image: string; description: string; }; slug: string; }) => {
{page.data.map((entry: { data: { draft: boolean; title: string; tags: string[]; category: string; published: Date; image: string; description: string; updated: Date; }; slug: string; }) => {
return (
<PostCard
entry={entry}
@@ -16,6 +16,7 @@ const interval = 50
tags={entry.data.tags}
category={entry.data.category}
published={entry.data.published}
updated={entry.data.updated}
url={getPostUrlBySlug(entry.slug)}
image={entry.data.image}
description={entry.data.description}