From f08e267f25ba5a5cb8c6d4c48ab3316a693674eb Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:52:21 +0100 Subject: [PATCH] fix(widgets): hide own Bluesky handle (svemagie.bsky.social) from sidebar webmentions --- _includes/components/widgets/webmentions.njk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/_includes/components/widgets/webmentions.njk b/_includes/components/widgets/webmentions.njk index 3032686..5777fdf 100644 --- a/_includes/components/widgets/webmentions.njk +++ b/_includes/components/widgets/webmentions.njk @@ -150,7 +150,17 @@ function webmentionsWidget() { merged.push(item); } - this.mentions = merged.sort((a, b) => { + // Filter out webmentions from own Bluesky handle + const filtered = merged.filter((item) => { + const authorUrl = item.author && item.author.url ? item.author.url : ''; + // Bluesky profile URLs can be at:// or https://bsky.app/profile/ or handle + return !( + authorUrl.includes('svemagie.bsky.social') || + (item.author && item.author.name && item.author.name.toLowerCase() === 'svemagie.bsky.social') + ); + }); + + this.mentions = filtered.sort((a, b) => { return new Date(b.published || b['wm-received'] || 0) - new Date(a.published || a['wm-received'] || 0); }); } catch (e) {