diff --git a/src/components/widget/NewPostNotification.astro b/src/components/widget/NewPostNotification.astro index 78b3c2748..148dbcdf7 100644 --- a/src/components/widget/NewPostNotification.astro +++ b/src/components/widget/NewPostNotification.astro @@ -486,16 +486,21 @@ // New post detectedChanges.push({ ...post, isUpdated: false }); } else { - const dateUpdated = post.pubDate > stored.pubDate; - const contentChanged = post.content && stored.content && post.content !== stored.content; + // Check for ANY change (Title, Date, Description, Content) + const titleChanged = post.title !== stored.title; + const dateChanged = post.pubDate !== stored.pubDate; + const descriptionChanged = post.description !== stored.description; + const contentChanged = post.content !== stored.content; - if (contentChanged) { - const diff = computeDiff(stored.content, post.content); - if (diff) { - detectedChanges.push({ ...post, isUpdated: true, diff }); - } - } else if (dateUpdated) { - detectedChanges.push({ ...post, isUpdated: true }); + if (titleChanged || dateChanged || descriptionChanged || contentChanged) { + // Calculate diff only if content changed + const diff = contentChanged ? computeDiff(stored.content, post.content) : null; + + detectedChanges.push({ + ...post, + isUpdated: true, + diff + }); } } }); diff --git a/src/content/posts/pin.md b/src/content/posts/pin.md index b89d16172..ea5c47d24 100644 --- a/src/content/posts/pin.md +++ b/src/content/posts/pin.md @@ -3,7 +3,7 @@ title: 加群向导 image: /random/h published: 2025-05-24 pinned: true -description: 关于如何联系二叉树树~ 开始技术切磋! +description: 关于如何联系二叉树树~ ---