Skip to content

Commit

Permalink
fix gitbook latest posts badge
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed May 23, 2024
1 parent 8df65b7 commit 3b06203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion themes/gitbook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
) {
Expand Down

0 comments on commit 3b06203

Please sign in to comment.