Adding support for Webmentions
I’ve added Webmention support to the posts on this blog.
Webmentions are a method for websites to know that they’ve been linked to (or mentioned) from elsewhere on the web.
Webmention is a web standard for mentions and conversations across the web, a powerful building block that is used for a growing federated network of comments, likes, reposts, and other rich interactions across the decentralized social web.
When you link to a website, you can send it a Webmention to notify it. If it supports Webmentions, then that website may display your post as a comment, like, or other response, and presto, you’re having a conversation from one site to another!
It depends on a couple of things being in place for it all to work, but I’ve implemented the basics to fetch and display any mentions that have been detected by the webmention.io service.
I have already been using Github Issues-powered commenting for the past couple of years, so I took the time to consolidate comments and Webmentions in to a single chunk of “interactions” functionality to fetch, cache, and render any comments or Webmentions. This is all done with native JS and could probably be improved further with a framework like Vue.js, but it works fine for now.
I’m using brid.gy to recieve Webmentions from Twitter and Reddit interactions via webmention.io — this will mean that if somebody shares/likes/retweets a link to one of my blog posts on either platform it will display that here below the post.
I’m using webmention.app and IFTTT to automatically try and send webmentions to sites I link to from within my posts.
As you can see it’s a bit complicated, and it feels like it’s held together with duct tape in places, but for now it works!
Lots of others have written about how they’ve implemented Webmentions on their sites, and these write-ups were really useful when arriving at my own implementation.
So to share the love, here are some links to those posts:
- Webmentions - Phil Gyford
- Webmentions for your Static Site - Rowan Manning
- Using Web Mentions in a static site (Hugo) - Paul Kinlan
- Adding Webmention Support to a Static Site - Keith J. Grant
- Adding Webmentions to My Static Hugo Site - Ana Ulin
- Using Webmentions in Eleventy - Max Böck
- Webmentions: Enabling Better Communication on the Internet - Chris Aldrich
- Add Webmention support to your website in ten minutes - Daniel Aleksandersen
- Sending your First Webmention from Scratch - Aaron Parecki
- Implementing Webmention on a static website - Deluvi
- Adding Webmention Support from Scratch - Dwayne Harris
- Social media responses on a Jekyll site using webmentions - James Dinsdale
- Adding webmentions to my blog - Sebastian De Deyne
- A Brief Look at WebMention - Ben Shi
- IndieWebify.Me
And that’s about it really. I’ll be tweeting a link to this post once it’s published and then any replies or likes will hopefully appear at the bottom of the page.
Mentioned elsewhere on this site
- Baking webmentions into the build
Back in 2022 I added webmention support to this blog.
- Sending webmentions on deploy
…spent a fair bit of time on the receiving end of webmentions, from adding support for them in the first place through to fetching them at build time and…
Related posts
- Enriching webmentions from third-party platforms
I keep finding new gaps in my webmention implementation. Mentions coming in from Bluesky, Lemmy and Lobsters were showing up with no author at all, just a blank avatar and an empty name. Reddit and Hacker News bookmarks fared a bit better, with a username attached, but got flattened into a generic “bookmarked” icon with no indication of where the post had actually been shared. Lobsters mentions also carried the wrong published date. None of these felt like they were pulling their weight compared to a proper webmention from a blog or Mastodon.
- A Bit of a Bodge To Make MASSIVE Emoji
I’ve been fiddling with an instance of Known over on social.omgmog.net. As part of my fiddling I’ve been trying out some of the plugins for Known. I came across the “Render Emoji Unicode” plugin but it was using an old library, and referencing an old version of Twemoji, so I updated it to use the latest Twemoji library.
- The woes of trailing commas in IE
If you leave a trailing comma in your JavaScript code, you’re a terrible person. It’s right up there with omitting semicolons as far as I’m concerned.
Discussion
- 2022
Reply on twitter.com
Reply on queer.party
Reply on indieweb.social
Reply on indieweb.social
Reply on indieweb.social
Reply on mastodon.social
Reply on mstdn.io
Reply on mstdn.io
Reply on mstdn.io
Reply on fedi.pimoore.ca
- WG
Zomg Max, congrats! Next step: getting rid of third-party reliabilities to send/receive the mentions yourself, perhaps?
- SS
My method to implement Indieweb principles and add webmentions support to my Jekyll site is probably the laziest of all. It enabled a decentralized reply system, as well as allowing reposts and likes.
Join the conversation
Reply from your own site with a Webmention (how?).
