MarkoK.dev

Comment articles using Mastodon

Thursday Feb 15th 2024
Marko
1 min read

Well lets face it. Previous commenting system was not in use. Nobody used it since it required making and account here and nobody did.

Geeks like me are probably already using Mastodon so now you can comment straight on to the corresponding toot and it will show up here.

So how this all works?

When the article gets published, a job will be run that posts a Mastodon post. Job also gets Mastodon status ID that will be attached to the article itself.

When you are viewing article there are code that fetches replies to the corresponding Mastodon post. Replies are cached for a couple of minutes so Mastodon instance is not flooded with requests.

Have fun!

Bonus

I made some changes to links also. You can now post link without creating an account. Link will need my approval and it will be published to links section or I will make an external article out of it.

Conversation

We use Mastodon to show our comments. You only need to post a reply for the corresponding toot. We cache our comments here so it may take a couple of minutes to show up here.
Join the conversation