Comments for Hugo Academic (Wowchemy) with Utterances

blog
hugo academic
wowchemy
utterances
comments
Author

David Fong

Published

December 23, 2020

Modified

August 18, 2021

There are endless numbers of blogs out there, often providing tidbits of useful information which I find useful. And occasionally, someone even finds my posts useful and uses the Wowchemy (Hugo Academic) ‘Contact’ widget to send me a comment or question! But these questions are not attached to any particular blog post. Wouldn’t it be nice if the a viewer could comment on an individual post in the blog?

The most commonly used commenting system on Hugo websites appears to be Disqus. Disqus does have ‘native’ and easy support in Wowchemy. And I’ve certainly used Disqus to provide feedback on other blogs. But there are also numerous complaints about Disqus’s speed (or lack thereof), resource intensity, advertisements and - even worse - potential violations of privacy.

But what - preferably free and ‘open’ - alternatives are there?

I initially planned to use Staticman for commenting, but setup seemed a little involved, and I would need to register for a (free) Heroku account.

I finally chose utterances, which cleverly uses Github‘s own ’issue’ system to provide comments on my blog, which is also ‘sourced’ from Github.

The disadvantage of utterances are

But ‘utterances’ is very easy to set up. I used the advice from Maëlle Salmon and Michele Sciponi. The instructions at the beginning of these blogs are clear, the final instructions at the end less so, so here are my notes for Hugo Academic version 4.8.0.

<script src="https://utteranc.es/client.js"
        repo="DavidPatShuiFong/vkelimHomepage"
        issue-term="pathname"
        label="comments 💬"
        theme="github-dark-orange"
        crossorigin="anonymous"
        async>
</script>
{{ if site.Params.comments.engine | and (index site.Params.comments.commentable .Type) | and (ne .Params.commentable false) | or .Params.commentable }}
<section id="comments">
  {{ if eq site.Params.comments.engine 1 }}
    {{ partial "comments/disqus.html" . }}
  {{ else if eq site.Params.comments.engine 2 }}
    {{ partial "comments/commento.html" . }}
  {{ else if eq site.Params.comments.engine 3 }}
    {{ partial "comments/utterances.html" . }}
  {{ end }}
</section>
{{ end }}
[comments]
  # Comment provider:
  #   0: Disabled
  #   1: Disqus (https://disqus.com)
  #   2: Commento (https://commento.io)
  #   3: Utterances (https://utteranc.es/)
  engine = 3
Back to top