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:
kinhoandliangjianhao authored and GitHub committed 2024-12-04 19:29:35 +08:00
1 parent 079abbc965
commit b604cdf18c
6 files changed
+22 -3

No files matched your search

+3 -1
View File
@@ -13,6 +13,7 @@ interface Props {
title: string
url: string
published: Date
updated?: Date
tags: string[]
category: string
image: string
@@ -25,6 +26,7 @@ const {
title,
url,
published,
updated,
tags,
category,
image,
@@ -54,7 +56,7 @@ const { remarkPluginFrontmatter } = await entry.render()
</a>
<!-- metadata -->
<PostMetadata published={published} tags={tags} category={category} hideTagsForMobile={true} class="mb-4"></PostMetadata>
<PostMetadata published={published} updated={updated} tags={tags} category={category} hideTagsForMobile={true} hideUpdateDate={true} class="mb-4"></PostMetadata>
<!-- description -->
<div class:list={["transition text-75 mb-3.5 pr-4", {"line-clamp-2 md:line-clamp-1": !description}]}>