We have received feedback that we should allow users to enter comments on posts. We intended to add this feature to Retired Thinker eventually, but we had not done so mainly because we couldn’t decide how elaborate the comments system needed to be. We decided to take an approach that required very little work on our part and incorporated a comments system called utterances into Retired Thinker. There is now a Comments section at the bottom of each post, including all past posts.
Another reason we put off adding comments until now is that Retired Thinker is a static website using Hugo (see Start a Blog!), and a comments system usually needs a database on the website back end to store comments. Having a database back end for a website makes it much more difficult to host—it requires more resources and therefore incurs more costs. But the utterances comments system allows Retired Thinker to remain a simple static website without any database. Utterances cleverly uses GitHub as the back end to store comments. That is, when users enter comments on a post, utterances stores them in a public GitHub repository that has been specially set up just to store comments for Retired Thinker. When each post page on Retired Thinker is served, a small script on the page pulls the comments for that post from that GitHub repository and displays them. This makes it trivially easy to deploy the utterances system on any website—you just have to set up a new GitHub repository for the comments and incorporate a small script into the website to implement the comments section.
The big downside of utterances is that, in order to leave comments, users need to have a GitHub account. GitHub will not allow comments to be added to the public repository unless you have a GitHub account and username. GitHub accounts are free and very useful if you write any code, and GitHub makes it pretty easy to create a new (possibly anonymous) account if you don’t already have one, but needing a GitHub account in order to comment is still a downside. On the other hand, all comment systems need to establish a username and account of some kind before a user can leave comments, so perhaps reusing a GitHub account is better than forcing users to create and remember yet another username and login just to leave a comment. If you think the GitHub account requirement is too onerous and refuse to create one, please leave a comment below to let us know… oh, wait… 😄
Other pluses and minuses of the utterances comments system include:
\(+\) The site maintainer has control over the comments via mechanisms on GitHub, so spam or other nasty comments can be removed.
\(-\) There is no mechanism to approve comments before they show up on the site. Nasty comments will appear on the site for everybody to see until a site maintainer removes them later.
\(-\) There is no threading or replying mechanism for the comments—they just appear in a flat list.
\(+\) It supports reactions to comments 👍.
\(+\) It supports themes and so the comments section can be made to look consistent with both the light and dark themes on Retired Thinker.
\(-\) The comments section makes the post pages slightly slower to load.
\(+/-\) The commenters’ GitHub avatar picture shows up next to the comment. Github uses a strange default avatar if you didn’t upload a picture to your GitHub profile. I know I hadn’t bothered to set up a GitHub avatar picture until just now…
\(+\) The comments are stored in such a way on GitHub that they could be fairly easily migrated to a different comments system in the future if needed.
Try it out below if you like!