Add Comments to a Hugo Blog Using Utterances
It’s trivial to add comments to a Hugo blog. I believe you can use Disqus, but for a simple dev blog I just want something lightweight and easy to use.
Enter Utteranc.es.
Utterances uses GitHub issues as a commenting system for your blog. This does mean that a GitHub account is required in order to set Utterances up or for readers to comment. I think that it is a safe assumption that most readers of dev/tech blogs have or should have a GitHub account so this doesn’t really present a problem in my mind to requiring a GitHub account to comment.
How to set up Utterances
- sign into GitHub and make sure the repo you’re going to use is public
- add the utterances app to your repo
- fill out the config wizard with the relevant info
- copy the 8 line config the wizard provided based on your input
- paste that info into
layouts/partials/comments.html
in your hugo dir (your theme may have additional config parameters to turn on comments) - commit your changes to git, rebuild your hugo blog, and boom, you’ll have comments on your blog