Max Glenister

Blog & IndieWeb • 3 min read • 2 interactions Plain text

Sending webmentions on deploy

Part 3 of 4 · Webmentions

I’ve 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 rendering them server-side so the discussion section doesn’t flicker in over JS. What I’d never actually done was send the other half. Every link I’ve ever made out to another IndieWeb site has just sat there, silently not telling anyone I’d linked to them.

Webmentions are two-sided. When I publish a post that links to someone else’s site, I’m supposed to ping their webmention endpoint to say “hey, I mentioned you”. That’s how IndieWeb replies and references actually close the loop, rather than just being a one-way pull. I’d been shouting into the void for years. Hopefully now some of it gets heard.

Hooking into the deploy

I’m already using webmention.io to receive mentions, but sending them needed something else. webmention.app has a simple /check endpoint that, given a URL, crawls the page, finds any outbound links, and sends webmentions to whichever of them support it. Point it at a post and it does the discovery and delivery for you.

So the new piece is a small Ruby script, scripts/send_webmentions.rb, that takes a list of post paths and pings webmention.app for each one:

paths.each do |path|
  url = "#{SITE_URL}/post/#{slug_for(path)}/"
  uri = URI('https://webmention.app/check')
  params = { url: url }
  params[:token] = TOKEN if TOKEN
  uri.query = URI.encode_www_form(params)

  res = Net::HTTP.post(uri, nil)
  puts "#{url} -> #{res.code}"
end

I’ve added this as a new job in the existing jekyll.yml workflow, running after the deploy job finishes. It diffs _posts between the previous and current commit, and only sends webmentions for posts that actually changed in that push.

- name: Send webmentions for changed posts
  run: |
    changed=$(git diff --name-only "$" "$" -- _posts | tr '\n' ' ')
    if [ -n "$changed" ]; then
      bundle exec ruby scripts/send_webmentions.rb $changed
    else
      echo "No changed posts in this push"
    fi

There’s also a manual workflow_dispatch input to send webmentions for every post in one go, for backfilling everything I’ve published without ever notifying anyone. The usual build takes about a minute. The backfill run took twelve, working through all 268 posts one at a time and waiting on webmention.app to crawl each page and chase down its outbound links. Sorry, webmention.app, for landing 268 URLs on you in one go.

I’m now relying on three separate free services to make this all work. webmention.io receives mentions, brid.gy bridges Mastodon and other social replies into webmentions in the first place, and webmention.app sends them out on my behalf. None of it is self-hosted, none of it has an SLA, and if any one of the three quietly shuts down or changes its API I won’t notice until mentions stop showing up or my GitHub Actions run starts failing. I touched on this same worry in the previous post, and adding a third dependency hasn’t made it go away. It’s still better than the alternative of not bothering at all, but the whole thing is built on infrastructure I don’t control.

  • Blog & IndieWeb · shares #indieweb
    Plugins instead of patches

    I’ve been running Known as my social posting hub for a while now. It’s a solid IndieWeb-friendly CMS that handles status updates, photos, and syndication to various silos. Recently I upgraded my instance for the first time in about four years, which meant dealing with all the little tweaks I’d made to core templates over that time. Previously I’d just edited core files directly, which meant upgrades would wipe my changes. After four years I had no idea what I’d even modified (I’ll go into the archaeology of that in another post). This time I decided to do it properly, and ended up writing four plugins.

    January 2026 • 3 min read
  • Blog & IndieWeb · shares #indieweb
    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.

    May 2022 • 3 min read
  • Tinkering · shares #programming
    Android Auto on my HR-⁠V's Android 4.0.4 head unit

    I recently bought a 2018 Honda HR-V as our family car. It has a 7” touchscreen running Android 4.0.4, a version so old it predates Android Auto by about three years. It runs Android Auto now anyway, thanks to a small app I built over the course of a week.

    November 2026 • 7 min read

Discussion

2 likes
  • BD
  • MH

No interactions yet

Join the conversation

Comment on the GitHub issue, or reply from your own site with a Webmention (how?).

Comment on GitHub

Webmentions last fetched 13 November 2026, 22:29