个人主页: https://zhangquan1995.github.io
了解一下国内的几个第三方评论系统,如“多说”,“畅言”,“友言”,“新浪云跟贴”:
- 多说,曾经较火的评论系统,网上介绍文章比较多,但已关闭,无法再用了
- 畅言,sohu旗下的,但是需要个人博客备案后才能使用,但github pages个人博客感觉备案比较难
- 友言,jiaThis旗下的,由于时http请求,github pages现在都是https了, 在https站点无法调用http请求,故也无法使用
- 网易云跟贴,曾被当作“多说”的替代品,可惜官方通报说也将在2017.08.01关闭了
Gitment,一款由国内大神imsun开发的基于github issues的评论系统, 具体介绍请看项目主页( github.com/imsun/gitment ).
申请一个Github OAuth Application
Github头像下拉菜单 > Settings > 左边Developer settings下的OAuth Application > Register a new application,填写相关信息:
-
Application name, Homepage URL, Application description 都可以随意填写.
-
Authorization callback URL 一定要写自己Github Pages的URL.
-
填写完上述信息后按Register application按钮,得到Client ID和Client Secret.
在jekyll博客调用gitment
在你需要添加评论系统的地方,一般是_layout/目录下的 post.html, 添加一下代码:
{% if site.comment_gitment_repo %}
<div id="gitmentContainer