Getting feedback with webmentions

Published on at techie , meta , 3 mins.

Since I moved from Wordpress to Jekyll back in 2012, having comments in my site has been a lost battle to me. For some time I enabled a third party provider (Disqus) but that feeling of leaving my readers content to a provider I did not control was too much of a burden to me and I ended up removing completely any chance for commenting on my site for a very long time.

Webmentions on the other hand has been a W3C standard since 2017. They are not super popular and yet, I’ve seen them many times so finally I decided to take a look and how would it be to implement it in my website.

Some weeks ago Christian’s excellent post came to my attention and the process he unraveled seemed approachable to me so I decided to give it a try.

The steps are pretty much as he explained in his post:

  1. Add the appropriate metadata to my website to allow to log into a few indieweb services, most relevantly webmention.io, the provider I’ve decided to act as my backend.
  2. Add the appropriate markup to my Hugo theme template to enrich it with microformats so my posts can be parsed correctly. This includes the syndication tag for every post I link to a Mastodon thread.
  3. Start converting reactions to my Mastodon posts into webmentions with https://brid.gy. This is going to be my main source of interactions, I think.
  4. Extend my Hugo theme template to allow me to refer to posts I reply (like this one) so I can generate webmentions easily.
  5. Adapted the code shared by Bryce Wray on his series about this topic to run a local process that gathers the webmentions into a data folder (one file per post) so I can render them at build time.

I know this seems a bit too convoluted. But for me the benefits are very clear: First, I allow anyone on the Internet to interact with my content in an open and decentralized way. And secondly, I collect all those interactions as data that is then added to my posts at build time.

Another very specific aspect of my implementation is that my hosting service for this website is a bit peculiar and it does not allow to load content from external services (no images, no JavaScript, no API calls, etc). That is actually good for my readers because the website is light, fast, and with very little of the bloat that characterizes the “modern web”. But for for webmentions that means:

  • I can’t load dynamically the mentions in a post with something like webmention.js. That is technical reason for the approach mentioned above of downloading the content locally and pushing it to my website source code base.
  • I can’t load external avatars for the folks that react to my website. Not a big deal, and I could eventually cache those locally somehow, but I haven’t spent time on that yet.

Anyways, are you running a blog or site with a static generator and using a different approach to collect and render comments? Have you considered adding webmention support?