14

I've made a website based on GitHub pages using Jekyll Theme. Currently I can post blogs in that website as well. However, I want to add a comments section at the end of the blog posts.

There are tutorials on how to add comments sections using Disqus. But I think that to use Disqus one needs to have a paid subscription. So I am looking for an alternative to Disqus to add a comments section.

Sharing any idea about it will be appreciated.

Originally from @Encipher here: (now-deleted for being "off-topic" on Stack Overflow since Stack Overflow requires the question to contain programming in it):


Here is what this well-received Q&A used to look like on Stack Overflow: https://web.archive.org/web/20220506172751/https://stackoverflow.com/questions/59096243/adding-comments-in-blog-posts-on-github-pages

There were 18 upvotes on the question and 20 on the main answer. I simply want it to be publicly searchable again.

enter image description here

1 Answer 1

15

This answer was originally on Stack Overflow here (now deleted).

Utterances comments (what I recommend and use)

You can use GitHub Issues themselves, in a public repo, as a commenting system, via a 3rd-party GitHub plugin called "utterances". See here:

  1. Utterances main page & installation info.: https://utteranc.es/
  2. Utterances GitHub repo: https://github.com/utterance/utterances
  3. You must install the utterances plugin into your GitHub account, here: https://github.com/apps/utterances
    1. GitHub lets you install this app for all of your respositories, or just repositories you select, which is nice. You may just want to install it on GitHub Pages repos you have, since it only needs access to those repos.
    2. Make sure your repos using utterances are public, or else readers won't be able to view the issues/comments, or comment.

As of Jan. 2021, I have now implemented Utterances on my personal website here: https://gabrielstaples.com/. Example page where you can see and leave test comments: GabrielStaples.com: How to add comments in blog posts on GitHub Pages websites -- scroll to the bottom to see the Utterances (GitHub Issues-based) comment section.

Other commenting systems

Other options also exist. Michael Rose, the creator of the #1 most popular GitHub-Pages-compatible minimal-mistakes Jekyll theme (see a demo here), has put together a short list of commenting systems here.

  1. Disqus
  2. Discourse
  3. Facebook
  4. utterances - my favorite, since it is Free and Open Source (MIT license) and no-cost, and uses convenient GitHub Issues as the commenting system. GitHub Issues comments have excellent markdown support, allow inserting nicely-formatted code blocks right into them, can be edited indefinitely, moderated by you (including editing or deleting comments which are inappropriate), and responded to with upvote buttons--all reasons I like them.
  5. Staticman
  6. https://giscus.app/ (thanks, @Henry C) - apparently also inspired by Utterances, but uses Github Discussions (which are a new GitHub feature) instead of Issues.

Old answer (manual options)

(this is how to manually use GitHub Issues as a commenting system, withOUT using utterances):

Give this a shot. This blog describes using a GitHub Issue to store comments for your static website: https://jekyllcodex.org/blog/gdpr-compliant-comment/

Here are some comment examples you can see at the bottom of the blog post. They support markdown syntax and look very nice: enter image description here

And they come directly from a GitHub issue, as can be seen on GitHub here:

enter image description here

2
  • 5
    I'd also like to throw in Giscus - giscus.app - into the mix also. It's inspired by Utterances but uses Github Discussions instead, which I think personally is a better fit than Github Issues.
    – Henry C
    Commented Sep 4, 2023 at 22:57
  • 1
    thank you for your answer, definitely a question worthy of stackoverflow. but this is definitely not always true for the moderators of stackoverflow.
    – Peter Teoh
    Commented Nov 7 at 8:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.