What is Utterances?
Utterances is an ad-free widget that reads and writes comments by making use of GitHub issues from a designated repository.
Decide on a Repository
Utterances uses the GitHub issue search API, therefore we will need a public GitHub repository to handle reading and writing comments; this can be done using an existing repository, such as the one used to store a website. However, this may congest any actual code issues relating to the website with comment issues. Therefore, I would suggest using a separate repository specially created for storing comments.
Install the Utterances App
Once a public repository to be used for commenting has been decided, install the Utterances app to the owner of the repository. When configuring the app, allow access to the comments repository you have chosen.
Add the Widget
Add the Utternaces widget to the desired location on the website, for example when using Hugo add it to layout/_default/single.html
to appear in the primary view. Ensure you replace <OWNER>
and <REPO>
with the GitHub owner of the repository and the repository name that will be used for storing the comments.
<script src="https://utteranc.es/client.js" repo="<OWNER>/<REPO>" issue-term="pathname" label="comment" theme="github-light" crossorigin="anonymous" async> </script>
Conclusion
All should be working, if not, ensure the repository is public and that the widget details are correct.
Happy commenting! 💬