Mastodon Icon RSS Icon GitHub Icon LinkedIn Icon RSS Icon

Testing Bluesky-Powered Comments

I am testing a thing. Let's see how it will work.

I am sorry for the second Bluesky article in a month, but I like to play with new things. Especially when new things help me solve a minor issue with my blog.

As you know, this blog has comments, and like many blogs, comments are rarely used. Still, I like to provide a place for them. Call me old-school if you want, but blogging can be a solitary endeavour and I like to have a small place to keep track of gentle visitors.

Unfortunately, because of the absence of a built-in commenting system, static generators require the use of external software solutions. In my blog, I mostly only used Disqus, the de facto standard. But I never liked it. It does more than I ask for and only God knows what they do with the data they collect.

Recently, though, everyone is experimenting with funny ideas involving Bluesky. I was interested in the first use cases for allowing replies done in Bluesky to appear as comments to an article.

That’s very cool and, luckily, I found a solution that works very well with Hugo (this blog’s static generation engine).

To implement this comment system, I followed this article by Oliver Menzel and applied some customizations. The article will guide you step by step starting with what to write in the Hugo’s template partial implementation, up to a basic CSS you can change as you wish (link to the archived version in case the original link rots away). It is very easy. It took me less than 10 minutes to have comments working on my theme.

Implementation Notes

If you want to have Bluesky-powered comments in your Hugo blog, you can follow the linked article. However, note that the article doesn’t specify that you need to load DOMPurify (to avoid DOM injections when you load the comments).

In my case, I downloaded the minified version from GitHub, stored it in my static folder, and loaded it into my theme header.

One Annoying Thing

The system works surprisingly well. The only annoyance is that it requires the Bluesky ID of the post you want to use as a base for the comments. And, of course, you cannot have the link before you publish the article and share it on Bluesky.

This means that I have to do a “double publish” every time (publish the article, share the article, get the ID, update the front matter of the article with the ID, republish the article). It is not a tremendous problem even with my clunky deployment script, but a slight annoyance nevertheless.

Are you putting all your eggs in Bluesky’s basket?

Of course, I don’t particularly like that comments are “hostage” on some third party service. But it was the same with Disqus, and honestly, I trust Disqus way less.

Moreover, I don’t have many comments anyway and if some really interesting and useful comments pop up, I will “immortalize it” in the article itself.

What about Mastodon?

I’ll stop you right there. There is a similar solution involving Mastodon. However, I didn’t try it. You know I have my beef with Mastodon and the tiresome holier-than-thou comments that are common on Mastodon are exactly the kind of comments I do not want on my blog.

So, to recap: yes, it is possible to do it and, no, I will not.

Conclusions

That’s it. You can find the comment section at the bottom of this article (unless you clicked on this faster than my “second publishing” step).

Let’s see how this little experiment will go.

(PS 16/12/2024) Moderation Solutions

I’ve found another small drawback with this system. In the API, I don’t see a way to exclude the replies I marked as “hidden for all”. That’s unfortunate. It would have been a great way to moderate comments.

At the moment, this is not an issue. But if it becomes one, I would have to implement a way to filter away undesired comments. For instance, I could decide to show only the replies I liked (so that my like becomes a kind of “authorization step”). I have already changed the code to allow custom sorting and filtering.

Comments 🦋

You can use your Bluesky account to reply to this post. Learn how this is implemented here.