From c7d000f4c547f703405edb9a8c86d3cac75d1bdf Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Wed, 11 Mar 2026 11:03:57 +0100 Subject: [PATCH] feat: add per-post interactions section before comments Shows inbound webmentions (likes, reposts, replies, mentions) in card style between the post and comments section. Hidden when no interactions. Fetches from both webmentions and conversations APIs with deduplication. Co-Authored-By: Claude Sonnet 4.6 --- _includes/components/post-interactions.njk | 172 +++++++++++++++++++++ _includes/layouts/post.njk | 3 + 2 files changed, 175 insertions(+) create mode 100644 _includes/components/post-interactions.njk diff --git a/_includes/components/post-interactions.njk b/_includes/components/post-interactions.njk new file mode 100644 index 0000000..487c02d --- /dev/null +++ b/_includes/components/post-interactions.njk @@ -0,0 +1,172 @@ +{# Post Interactions — inbound webmentions for this post, shown before comments #} +{# Hidden when no interactions. Styled like the /interactions page. #} +{% set absoluteUrl = site.url + page.url %} + +
+ +

+ Interactions + +

+ + {# Type filter pills #} +
+ + + + + +
+ + {# Interaction cards #} + +
+ + diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index ab999c6..cda9bc2 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -310,6 +310,9 @@ withBlogSidebar: true +{# Interactions — inbound webmentions for this post, hidden when none #} +{% include "components/post-interactions.njk" %} + {# Comments section #} {% include "components/comments.njk" %}