+
{
image && (
-
+
+
{
image && (
-
+
-
-
+
-
+
阅读更多
-
+
{post.title}
-
{post.excerpt || post.description}
+{post.excerpt || post.description}
diff --git a/src/components/blog/ListItem.astro b/src/components/blog/ListItem.astro index 1d99b48..a524e84 100644 --- a/src/components/blog/ListItem.astro +++ b/src/components/blog/ListItem.astro @@ -5,33 +5,42 @@ import PostTags from '~/components/atoms/Tags.astro'; import { getPermalink } from '~/utils/permalinks'; import { findImage } from '~/utils/images'; import { getFormattedDate } from '~/utils/utils'; +import type { BlogPost } from '~/types/BlogPost'; + +interface Props { + post: BlogPost; +} const { post } = Astro.props; const image = await findImage(post.image); +const publishDateString = post.publishDate instanceof Date ? post.publishDate.toISOString() : post.publishDate; ---
+
{image && (
)}
-
-
-
-
-
-
-
+
+
+
@@ -41,32 +50,40 @@ const image = await findImage(post.image);
}
+
+