Ecmel Berk Canlıer - 21 June 2020

Use the Fediverse as a comment section

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:

I’d like to propose an extra option: Use the fediverse.

Why

Why Not

Ok, that’s enough trying to justify something I didn’t think that much about. Let’s get into the how.

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 own needs: b81c454f6f8fe67ca065bea1c30bf5b0811551cb

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.

Discuss in the fediverse