What is Utterances?

  • A lightweight comments widget built on GitHub issues.
  • Use GitHub issues for blog comments.
  • Open source.
  • Allow Markdown syntax.

Configuration

  1. Create an empty Github repo.
  2. Install utterances app on that repo
  3. In the utterances app, only select the repo just created for comment.
  4. Update config.toml as below:
[params.utteranc]
enable = true
repo = "owner/comments_for_hugo"
issueTerm = "pathname"
theme = "github-light"
  1. Create contents/ folders in layouts directory.
  2. Create single.html in the layouts/*.
  3. Add the following script to /layouts/*/single.html
<script src="https://utteranc.es/client.js"
        repo="owner/comments_for_hugo"
        issue-term="pathname"
        label="comments"
        theme="github-light"
        crossorigin="anonymous"
        async>
</script>
  1. Utterances comments functionality is installed.

Reference

  1. Utterances
  2. How to add Utterances in config.toml