If you have a static site like my blog, and if you want people to be able to comment on your posts, there are some options that come to mind:
- Use a third party comment system like Disqus
- Host a similar system on your own server
- Share your posts on external discussion sites and link to those posts
I’d like to propose an extra option: Use the fediverse.
- You don’t need to manage any data unless you’re self-hosting the ActivityPub instance yourself.
- You don’t need as much spam protection as you’d need if you just had a regular comment box. Most of the spam will be avoided simply because you need an outside account.
- (If you don’t host your own ActivityPub instance) You don’t need as much moderation as you’d need if you hosted your comments yourself.
- Barrier to entry for commenting is increased. If your audience doesn’t use ActivityPub, they won’t be able to comment.
- Your comments will be at the mercy of the instance owners if you’re not hosting your own ActivityPub instance.
Ok, that’s enough trying to justify something I didn’t think that much about. Let’s get into the how.
The idea is simple: Post a status for each page, fetch all replies for said status and display them in your website.
Now, I don’t have a plug and play widget or whatever for this. I’m sure one is out there, but if there isn’t, creating your own shouldn’t be that hard.
Here is the commit implementing it on my own site, feel free to edit it for your
Please note that my script won’t work if the instance you’re planning on using doesn’t implement Mastodon’s API, and uses some Pleroma-specific stuff.
I haven’t looked into how I can use the ActivityPub protocol itself to get this information, but that might be a nice-to-have if you’re planning on making something more general.