Adding Webmentions to my blog
Webmentions is a relatively standard for federating comments and mentions across websites. When you mention someone or like a post, you own your data, but it can show up on their site — neat!
I use micro.blog to post short messages to the internet and push them to my Twitter, Mastodon, and otherwise interact with internet friends.
Micro.blog supports webmentions out of the box, which means if you respond to someone’s post there, they can show it on their blog, and it will show up in the micro.blog feed.
I’m in an odd situation because I don’t host my blog with micro.blog directly, I use a static site generator called Hugo, and because it’s static I don’t have an easy means of receiving webmentions myself.
This is where micro.blog comes in. Any post from this blog gets posted to micro.blog automatically, as it syncs via RSS, and any post on there can be responded to via webmentions. All I have to do, is redirect webmentions to this website over to micro.blog.
Implementing this involves adding some links to your <head>
tags, and then fetching comments from micro.blog.
Add webmention callbacks to your blog’s <head>
, replacing USERNAME
with your microblog username:
<link href="https://micro.blog/USERNAME" rel="me" />
<link rel="webmention" href="https://micro.blog/webmention" />
<link rel="authorization_endpoint" href="https://micro.blog/indieauth/auth" />
<link rel="token_endpoint" href="https://micro.blog/indieauth/token" />
After that, you can add a section for fetching comments as I’ve done here.
Related posts:
- Adding webmentions to microblog by Steve Layton
- Webmentions on a static site with GitHub Actions by Sebastian De Deyne
If you have any trouble setting this up, or just want to chat, feel free to reach out to me on Twitter or Mastodon.
On the web
📝 30 May 2025 at 21:25 - Going down a website rabbit hole is just the best...
Fri May 30 2025 by Kev QuirkVideogame Franchises 2
Thu May 29 2025 by joelchrono's websiteHow I Made Queuedle
Wed May 28 2025 by Andrew Healey's BlogConfiguring Jujutsu
Sat May 24 2025 by oppiliappan's μblogCommitting XML horrors to style my blogroll
Sat May 10 2025 by nicholas.cloud
Generated by openring