How to add a comment functionality using uterances

What is Utterances? A lightweight comments widget built on GitHub issues. Use GitHub issues for blog comments. Open source. Allow Markdown syntax. Configuration Create an empty Github repo. Install utterances app on that repo In the utterances app, only select the repo just created for comment. Update config.toml as below: [params.utteranc] enable = true repo = "owner/comments_for_hugo" issueTerm = "pathname" theme = "github-light" Create contents/ folders in layouts directory. Create single.html in the layouts/*. 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> Utterances comments functionality is installed. Reference Utterances How to add Utterances in config.toml

June 15, 2020 · 1 min · 102 words · Ken Cho