A tutorial on how to add based comments to your static website using (probably will work on too)

This is day 69 (nice) of

Make sure to leave a comment if you want to test it yourself, although it has worked for a while now :P

Too many favorites and not enough comments, come on guys the parent post lol

@joel okay, this is cool! I may have to try doing this with my Hugo blog.

@joel I think your rendering of replies to the comments might be a bit off. Or at least confusing.

@dmoonfire Just noticed, seems like pleroma does not put its stuff inside ot <p> tags for some reason, I will have to thinker with the CSS a bit more

@joel Also, images aren't coming through, not that I think you are worried about that. :D

@joel If someone gets it to look this nice and work that well with , please ping me 🙏
I'd be interested to add it to my site, but got too much on my plate atm to take a look myself

@joel I went on a similar journey. (

I think it definitely works well as a cementing mechanism. I ended up incorporating webmentions into the comment system as well. Mostly as an exercise, since it's not widely used.

Have to check both of your articles since I got issues with some posts ...

@joel That's really cool. You can just replace the tradional commenting system which requires accounts on most websites and open the gate to the Fediverse instead. I wish more people would use this! Good work!

@joel love it beeing completely client-side and soooo simple. Also using Mastodon makes more sense than Cactus comments which use Matrix.

@joel This is a test post by me, @pyre35 . I promise I'm not 80 years old but I do want to see how this works!

@joel Pretty clever. I bet there is all sorts of stuff you could do with the API. Though wouldn't you have to pregenerate the toot, first? Then plug that ID into the comment JS? I'm unsure of the workflow for this.

@nathand Yes, I do have to create the mastodon post, right now I just edit the file again and push the changes with the proper id.

I could create the posts first with the soon-to-be link for the blogpost, but it would be confusing.

Right now I am thinking about doing some hook with the cli tool `toot` to post the link and do some stuff with sed, echo and then another git push. But meh, manual works too

@joel I wish enough of my audience used Mastadon for this to be a good move for my own blog.

...actually, I doubt any of them do.

@joel Thanks for sharing all those details. I look forward to trying this out on my Hugo-based blog ( and ditching Disqus.

Pelican implementation of comments 

I did the same last week for my Pelican generated blog

I also added some improvements,

1. It is now a stand alone script and not an inline one, which does some exception handling. It also formats CWs.

2. Edited template to create meta tags in the article header to link to - 1/2

Pelican implementation of comments

3.Renamed Mastodon to Fediverse, since any activitypub actor can comment.

The lack of a free license by the original author is a bit disconcerting at this point. 😅 - 2/2

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.