From 3b062037cef04413ea96440a94b5902bf6129d1e Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 23 May 2024 20:51:09 +0800 Subject: [PATCH] fix gitbook latest posts badge --- themes/gitbook/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/gitbook/index.js b/themes/gitbook/index.js index c81110b0ce7..25af5a5c6b7 100644 --- a/themes/gitbook/index.js +++ b/themes/gitbook/index.js @@ -75,7 +75,7 @@ function getNavPagesWithLatest(allNavPages, latestPosts, post) { } // 属于最新文章通常6篇 && (无阅读记录 || 最近更新时间大于上次阅读时间) if ( - latestPosts.some(post => item?.short_id === post?.short_id) && + latestPosts.some(post => post?.id.indexOf(item?.short_id) === 0) && (!postReadTime[item.short_id] || postReadTime[item.short_id] < new Date(item.lastEditedDate).getTime()) ) {