devroom.io


Comments are back on the menu

Comments are back on the menu

Allowing comments on your website is scary. You have to keep a constant eye on them and there’s lots of spam and trolling. The upside is getting that warm, fuzzy feeling when people react positively to your work.

Back in the day, when I ran WordPress, comments were included. You had to enable JetPack to get any sane kind of spam filtering. Still, dubious comments go through all the time and it was a constant effort to keep things clean.

When I moved to a staticly generated website, I started using Disqus. It was the hot new thing at the time. But, after a few years, when Disqus was aquired by Zeta Global, privacy concerns rose and I decided to ditch comments on my site alltogether.

Utterances

Recently I stumbled upon Utterances. They offer a really neat way of allowing comments on your static site by leveraging Github Issues. With a small bit of JavaScript and the Github Issues Search API, any github user can easily post a comment on my site now.

Concerns

There are a few concerns I have, even with a neat solution like Utterances.

  • Comments are stored separately from my blog; I cannot create backup of it all or store it under version control.
  • Github is still a third party; I’d like this to work with my self-hosted Gitlab instance some day.
  • Unsure how much spam to expect. Maybe Github Issues is good at stopping those?

Despite these concerns I’m turning comments on for a while to see where it takes me.

Idea

If only… maybe Utterances, or something else, could function like this:

  • Load existing comments from a comments.json or similar, related to the page you’re reading. This is under version control of your blog. You could even render it with a static site generator right into the page HTML.
  • When a new comment is posted, instead of a Github Issue, create a {Pull|Merge} Request with that comment on the comments.json for that page.
  • After a review, you simply merge the comment and (because you are using CI/CD, right), your new comments get pushed out automatically.

Update 11 March 2025

As it turns out, comments are not used all that much here. So, I decided to remove them again.

Also, a huge shout-out to both people who posted a comment in the past month.

Copyright © 2025 Ariejan de Vroom

Validate HTML5