From bdcec5752c226c0927052204a507b35aeeac3a1e Mon Sep 17 00:00:00 2001 From: svemagie Date: Mon, 20 Apr 2026 17:57:47 +0200 Subject: [PATCH] fix: hoist bskySyndUrl detection before outer mentions.length gate --- _includes/components/webmentions.njk | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/_includes/components/webmentions.njk b/_includes/components/webmentions.njk index 0ccb156..fe819c0 100644 --- a/_includes/components/webmentions.njk +++ b/_includes/components/webmentions.njk @@ -14,7 +14,15 @@ data-buildtime="{{ buildTimestamp }}" class="hidden"> -{% if mentions.length %} +{# Detect Bluesky syndication URL here — needed to show section even without webmentions #} +{% set bskySyndUrl = "" %} +{% if syndication %} + {% for url in syndication %} + {% if "bsky.app" in url %}{% set bskySyndUrl = url %}{% endif %} + {% endfor %} +{% endif %} + +{% if mentions.length or bskySyndUrl %}

Interactions ({{ mentions.length }}) @@ -113,14 +121,6 @@ {# Replies — webmention replies merged with Bluesky + Mastodon/AP threads (deduplicated) #} {% set wm_replies = mentions | webmentionsByType('replies') %} - {# Detect Bluesky syndication URL #} - {% set bskySyndUrl = "" %} - {% if syndication %} - {% for url in syndication %} - {% if "bsky.app" in url %}{% set bskySyndUrl = url %}{% endif %} - {% endfor %} - {% endif %} - {# Detect Mastodon/AP activity: check if any webmention reply came via fed.brid.gy #} {% set mastodonInstance = site.feeds.mastodon.instance %} {% set apIdentity = site.fediverseCreator %}