diff --git a/_config.yml b/_config.yml index 640242fd8d0..62a92810b50 100644 --- a/_config.yml +++ b/_config.yml @@ -64,7 +64,12 @@ disqus_username: hux # Netease settings netease_comment: false - +# utteranc settings +# utteranc: +# enable: true +# repo: [username]/[repo] +# issue-term: pathname +# theme: github-light # Analytics settings # Baidu Analytics diff --git a/_doc/README.zh.md b/_doc/README.zh.md index 449fe19e0e1..1850050e35d 100644 --- a/_doc/README.zh.md +++ b/_doc/README.zh.md @@ -200,13 +200,15 @@ iframe在不同的设备中,将会自动的调整大小。保留内边距是 #### Comment -博客不仅支持多说[Duoshuo](http://duoshuo.com)评论系统,也支持[Disqus](http://disqus.com)评论系统。 +博客不仅支持多说[Duoshuo](http://duoshuo.com)评论系统,也支持[Disqus](http://disqus.com)评论系统和[utteranc](https://utteranc.es/)评论系统。 `Disqus`优点是:国际比较流行,界面也很大气、简介,如果有人评论,还能实时通知,直接回复通知的邮件就行了;缺点是:评论必须要去注册一个disqus账号,分享一般只有Facebook和Twitter,另外在墙内加载速度略慢了一点。想要知道长啥样,可以看以前的版本点[这里](http://brucezhaor.github.io/about.html) 最下面就可以看到。 `多说` 优点是:支持国内各主流社交软件(微博,微信,豆瓣,QQ空间 ...)一键分享按钮功能,另外登陆比较方便,管理界面也是纯中文的,相对于disqus全英文的要容易操作一些;缺点是:就是界面丑了一点。 当然你是可以自定义界面的css的,详情请看多说开发者文档 http://dev.duoshuo.com/docs/5003ecd94cab3e7250000008 。 +`utteranc` 优点是: 基于github issues, 能访问github就能使用;缺点是:当路径为中文时,在github里生成的issues标题是UrlEncode过的。 + **首先**,你需要去注册一个账号,不管是disqus还是多说的。**不要直接使用我的啊!** **其次**,你只需要在下面的yaml头文件中设置一下就可以了。 diff --git a/_includes/utteranc.html b/_includes/utteranc.html new file mode 100644 index 00000000000..ededacad652 --- /dev/null +++ b/_includes/utteranc.html @@ -0,0 +1,13 @@ +{% if site.utteranc.enable %} + + + +
+ +{% endif %} \ No newline at end of file diff --git a/_layouts/post.html b/_layouts/post.html index 67c2544ae0f..26f2ce1c55b 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -61,6 +61,10 @@
{% endif %} + + + {% include utteranc.html %} +