mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
fix: remove platform exception in client-side webmention filter
Conversations items are now included in build-time rendering via conversationMentions data, so they no longer need a special exception to bypass the timestamp filter. All items (webmention.io and conversations) are now filtered equally by build timestamp.
This commit is contained in:
@@ -58,10 +58,9 @@
|
||||
let mentionsToShow;
|
||||
if (hasBuildTimeSection) {
|
||||
// Build-time section exists - only show NEW webmentions to avoid duplicates.
|
||||
// Conversations items (which have a 'platform' field) are never included
|
||||
// in the build-time cache, so always show them regardless of timestamp.
|
||||
// Both webmention.io and conversations items are included at build time,
|
||||
// so filter all by timestamp (only show items received after the build).
|
||||
mentionsToShow = allChildren.filter((wm) => {
|
||||
if (wm.platform) return true;
|
||||
const wmTime = new Date(wm['wm-received']).getTime();
|
||||
return wmTime > buildTime;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user