From c590ba3210625a60c622946abf25816d2ad307d8 Mon Sep 17 00:00:00 2001 From: gbanyan Date: Mon, 17 Nov 2025 18:17:49 +0800 Subject: [PATCH] Show excerpt under tags in article lists --- components/post-list-item.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/post-list-item.tsx b/components/post-list-item.tsx index 8a6c647..0ef5a76 100644 --- a/components/post-list-item.tsx +++ b/components/post-list-item.tsx @@ -12,6 +12,9 @@ export function PostListItem({ post }: Props) { ? post.feature_image.replace('../assets', '/assets') : undefined; + const excerpt = + post.description || post.custom_excerpt || post.body?.raw?.slice(0, 120); + return (
  • @@ -49,9 +52,9 @@ export function PostListItem({ post }: Props) { ))} )} - {post.description && ( + {excerpt && (

    - {post.description} + {excerpt}

    )}