π

Add Comments to Your (Static) Blog Using Fediverse Hashtags

Show Sidebar

(Note: there is a similar German article available as well.)

If you run a (static) blog, you probably ran into the same wall everybody else does eventually: readers want to react, ask questions, or add their own two cents, but static sites - by design - don't ship with a comment section. The classic answers to this problem (Disqus, giscus, utterances, a self-hosted forum, ...) all reintroduce exactly the kind of server, database, or third-party tracking dependency that made you choose a static site generator in the first place.

There is a much lighter alternative: let the Fediverse be your comment system.

Furthermore, you can also use this method for your non-static web-blog. But static blogs do serve as a much better use-case example here.

The idea itself isn't new and isn't mine alone - once you go looking, you'll find it popping up independently in several corners of the IndieWeb and static-site community. What I want to do here is explain why the Fediverse is a good fit for this job in the first place, walk through the two approaches people actually use, explain why I settled on one of them, and give you enough to try it on your own blog today.

The Problem in One Sentence

You publish an article as a (static) file. Some time later, a reader wants to comment. Where does that comment live, and how does anyone else ever find it again?

Why the Fediverse Itself, and Not a Dedicated Comment Widget

Before comparing implementations, it's worth asking the more basic question: why reach for the Fediverse (Mastodon, and anything else that speaks ActivityPub) at all, instead of a purpose-built comment widget?

Therefore, the Fediverse doesn't force you into an interface dictatorship, rule monopoly or account hurdles like other web forums like reddit, Hacker News, Slashdot, Facebook have.

Once you accept that the Fediverse itself is a solid foundation for comments, there's still a design decision to make: how exactly do you tie a Fediverse conversation to one specific article?

Two Approaches

As far as I'm aware, there are two major patterns for doing this:

  1. One thread per article. You (the author) post one toot announcing the article and pin/link that specific post. All comments become replies within that single thread. Readers need to locate that one post in order to participate.
  2. One hashtag per article. You assign each article its own (reasonably unique) hashtag. Anyone, anywhere in the Fediverse, can start their own toot using that hashtag whenever they want to comment - independently of everyone else's toots.
    • Actually, it would be even better to include a second hashtag: the hashtag that relates to the blog itself. This way, people might follow that general blog hashtag and still get messages referring to one single article.

Both approaches are valid. My personal preference is clearly the hashtag approach, and I use it on this very blog. Here's why.

Why Hashtags, Not a Single Thread

To be fair to the alternative: the single-thread approach has real advocates, and it's a legitimate design too - if you'd rather have one clean, linear conversation that's trivial to embed in full, it might suit you better. I've seen the idea written up elsewhere as embedding one Fediverse thread as the entire comment section for a post. Where it falls short compared to hashtags, in my experience, is durability and discoverability over time: a late reply to an old thread is easy to miss (people replying into an existing thread often default to a quieter visibility setting rather than fully public), whereas a late post under a followed hashtag reaches subscribers just as reliably as an early one. And if the one post everything hinges on ever disappears - account migration, deletion, moderation action - your entire comment section disappears with it.

The trade-off to my own preference: a single thread gives you one linear, easy-to-embed conversation, while hashtag-based comments are scattered and need to be collected (e.g., via a hashtag search link, or a small script that fetches and embeds matching public toots). In practice I've found that a plain link to the hashtag search is enough - readers are used to clicking through.

Considerations

The hashtag approach isn't free of downsides:

None of these are showstoppers; they're just things to plan around.

How to Actually Do This

The mechanics are refreshingly simple:

  1. Pick a hashtag for your blog in general. In my case, this is #publicvoit.
  2. Pick a hashtag scheme for your articles. It just has to be reasonably unique so it doesn't collide with unrelated toots. A good option is deriving it from the article's slug or publishing date, e.g. something like #20260822_BlogCommentsViaHashtags (from this article) or a short, distinctive slug. If you publish often under a shared project name, combining a short prefix with a running number (think #project42) also works well and keeps tags short.
  3. Announce the hashtags. Add a line to the bottom of your article like "Discuss this article using #your-blog #your-hashtag" and link it straight to a hashtag search/timeline (e.g. https://mastodon.social/tags/your-hashtag, or better, a search on your own instance).
  4. Post about the article yourself, including the blog + article hashtags, from whatever Fediverse account you use for your blog or project. This seeds the tag and gives people something to reply to if they'd rather join an existing toot than start their own.
  5. Optionally, embed recent toots. If you want a "comments" look directly on the page, you can fetch and embed public toots matching the article hashtag at build time - several small static-site-friendly tools exist for this, or you can write a short script yourself since Mastodon's public API is simple and well documented.
  6. Let go of a central inbox. You don't need to collect, approve, or store anything. The Fediverse is the comment database.

That's it. No plugin, no database migration, no privacy policy update for a third-party widget.

Give it a Try

If you maintain a static blog and have been putting off adding comments because every off-the-shelf option felt too heavy, too tracking-laden, or too locked-in, give the hashtag approach a try on your next post. It costs you a single link at the bottom of the article, and it hands the entire hosting, moderation, and notification problem to infrastructure that already exists and that you don't have to run yourself.

In case you're using my static blog generator lazyblorg, you don't have to do anything at all: the proper hashtags are auto-generated and published in the comment section below.

How to Follow Your Own List of Article Hashtags? (kamm)

One issue might remain, depending on your situation: when people are using your article hashtags and not your blog hashtag as I sugested, you most probably will miss those messages.

To fix that problem, I added a feature to my static web page generator --hashtag-file which writes all auto-generated article hashtags into a CSV file.

You may generate the article hashtag list via an alternative method of your choice if you are using a different method to generate article hashtags. Either way, you need the list in some form.

Then I made kamm which stands for "Karl's Awesome Mastodon Manager". Yes, I obviously felt bold that moment. ;-)

This little tool is able to digest hashtags provided in form of a CSV file. It understands multiple CSV formats but the hashtags need to be in the first (or in the only) column.

After the basic kamm setup (see README), you can use a command like

 uv run kamm.py --new-hashtag-file YOURHASHTAGFILE.csv	  

to update your Mastodon account so that you now follow all the new hashtags. It automatically checks your settings and creates follow requests for missing tags only.

Isn't that neat? ;-)

This way, I follow hundreds of auto-generated article hashtags, in my case.


Related articles that link to this one:

Comment via using the hashtag #20260822_BlogCommentsViaHashtags (decentralized), email (persistent) or via Disqus (ephemeral) comments below: