Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding comments in blog posts on github-pages [closed]

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.

like image 514
Encipher Avatar asked Nov 28 '19 21:11

Encipher


People also ask

Can you comment on a closed pull request?

You can comment on a closed or merged pull request, but you cannot merge or reopen it.

What does close with comment mean in GitHub?

There is a feature "Close with Comment" in GitHub that allows the user to comment on why they are closing the issue. The GitHub plugin does not take this comment into account when creating the post.

Can I edit my website after publishing on GitHub?

You can edit files directly on GitHub in any of your repositories using the file editor.

Can you leave comments on GitHub?

Hover over the line of code where you'd like to add a comment, and click the blue comment icon. To add a comment on multiple lines, click and drag to select the range of lines, then click the blue comment icon. In the comment field, type your comment.


2 Answers

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.

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

Update Jan. 2021: I have now implemented Utterances on my personal website here: https://gabrielstaples.com/. Example page: https://gabrielstaples.com/google-pixel2-touchscreen/ -- scroll to the bottom to see the Utterances (GitHub Issues-based) comment section.


Old answer

(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

like image 89
Gabriel Staples Avatar answered Sep 19 '22 01:09

Gabriel Staples


Note that you typically cannot use comments in a static site. You need a third-party solution, or you need to use the Github hack to create GDPR compliant comments.

Staticman is an option.

You can find more solutions by searching for 'comments' at https://www.thenewdynamic.org.

like image 44
JoostS Avatar answered Sep 21 '22 01:09

JoostS