Spotted Arrow


Settting Up Webmentions

Webmention is an open web protocol for referencing other articles and giving them a “shout-out” for the work they’ve done. I’ve added Webmentions to this site but I also need to test them so in the process of doing that I might as well promote and discuss Webmentions in the hopes of encouraging other sites to do the same.

The Webmention standard was established in 2017 and is starting to gain ground. I imagine this will continue as more people switch over to open protocols like the Fediverse, as opposed to the more centralized and corporate ones we are accustomed to (i.e. the bird site).

I was inspired to use Webmentions when reading an article by Xe Iaso about their newest site update. When I scrolled to the bottom it said This post was not WebMentioned yet. You could be the first!. This got me interested in trying to add Webmentions to my site and seeing how this specification works.

To get Webmentions working on this site there were a couple of things I needed to do to set it up. I need to be able to receive and send Webmentions so that I can receive mentions about my articles as well as to let others know that I mentioned their article.

To receive Webmentions I am using, a free service to receive Webmentions for this site. Sign-up is relatively straightforward but I was not able to get pgp key sign-in to work so I settled on GitHub instead. Now, whenever someone sends a Webmention notification, this server can receive the notification to the database and append the mention. On my site, I can query the API for mentions of any one of my articles.

To send Webmentions I am using, another free service to send Webmentions whenever I write a new article. The suggested setup is to use IFTT (If This, Then That), a webhook as a service that has a generous free tier. The IFTT hook connects to my RSS feed so that whenever I write a new article, it will send Webmentions, and if the user is set up to receive them, will show on their website.

To test Webmentions you can use I was not able to get it to work for myself so I tested it out in other ways.

I am using Preact with Astro to render mentions on the client when the component that renders them becomes visible. This should cut down on the number of times it makes a request to the API.

This article was written with help from:

Hopefully, they get a Webmention if this all works correctly.

Webmention is an open web protocol to give shoutouts to other web netizens. There are free services that you can utilize to send, receive, and test Webmentions. As with any open web protocol, it can be used for evil so be aware of spam and make sure to blacklist sites when you come across this.

This article has Webmentions