Platform-Aware @-mentioning People on my Blog

Since I started to publish short notes to my site, I've been trying to make them more social, such as mentioning others in my content.

Although I want to publish to my website, I don't want to just post to my own site, but also share these for folks following me on Twitter, so I configured automagic syndication of these notes to Twitter as tweets using Bridgy.

This led to a bit of a dilemma when mentioning others. These notes were being syndicated with a mention of i.e. Anna with her site's URL, which looked a bit weirder to folks on Twitter, and also didn't send her a notification on Twitter:

But if I set the URL directly as her Twitter URL, then I wasn't being the best IndieWeb citizen, as I was giving in to the silo'd web.

The solution for this was to have some awareness of where the content was being published to, and then publish the correct URL for that service, if possible.

I decided that I didn't want this to happen when I first created the content (via my Micropub server but when the site renders itself, as then it's more up-to-date.

Following some of Seb's points on his own implementation of it, I've now set it up for my own site.

I can now @-mention folks by using their profile URL, such as If they have a Twitter URL configured for their site, it'll provide a Twitter URL on syndication. For folks that don't have a Twitter URL configured, it'll just syndicate their URL. If I want to simply @-mention a Twitter URL, I've already got functionality in my Micropub server that will rewrite a Twitter URL to an h-card with their name.

You can see an example at /mf2/2020/03/g1mpf/.

Update 2020-07-06: I noticed that the original Microformats2 for this wasn't quite working, as it wouldn't handle interacting with quote tweets. This is now addressed, but is a word of warning to anyone doing this! The straightforward fix can be found on the GitLab Merge Request that fixed it.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0. #twitter #indieweb.

Also on: IndieWebCamp logo logo

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.