Can someone please help me add the Utterances commenting plugin to the Hugo-goa, a Hugo theme? I’ve added the HTML file into the folder structure of my site theme but I don’t know/understand how to reference it in my config.toml file, can someone help me a complete noob?
I’ve commented out discuss Discuss commenting but add its replacement.
Here is a link to the Hugo-goa theme. My commenting repo is here. There is nothing in it, it was made for the commenting setup only.
In a separate question, is there a way to make the Utterances controlled by the theme’s front matter so the author can designate whether a page gets comments or not?
So, for example…
---
Author: me
title: My title
published: true
comments: false
---
On another page the comment visibility may be true.
What @anon34553931 mentions shall be enough. You just need to paste it into your relevant layout (in that case content.html).
I know that utterances is quite popular and it’s a good solution but personally would recommend thinking about activating discussions in GitHub and using Giscus for comments.
I might be wrong, but perhaps you have not implemented utterances properly. I tested the code I shared and in pages where the comments: false is set, the script does not show up in the source code. So, I advise you troubleshoot the installation again (you can also test in production and see).
Exactly.
I see code loading in console but not displaying.
Try to implement it to see if it’s working before adding conditions to when need to be displayed.
You also have to decide i you want the comments on or off by default. But troubleshoot your installation and get back. This seems to be an Utterances issue, not a Hugo issue.