用gitment为hexo增加评论功能

最近发现一个不错的评论插件gitment,它是基于github开发的,而且hexo的最新的next主题默认已经安装了gitment,只要做一个简单的设置,就能开启gitment功能。

注册OAuth application

注册网址https://github.com/settings/applications/new
Authorization callback URL 填写你的hexo博客路径,比如我的是http://zhy.one

注册完之后,记录下Client ID 和Client Secret,后面要用到

修改next主题配置文件_config.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
gitment:
enable: true
mint: true
count: true
lazy: false
cleanly: false
language:
github_user: 你的git用户名
github_repo: 你的git用户名.github.io
client_id: b7xxxxxx867fxxxxxx52
client_secret: 8e9exxxxxxx803ec6e9c2xxxxxxxxx02b7fd
proxy_gateway:
redirect_protocol:

现在你的hexo已经具备留言评论功能了。评论时先登入你的github,然后点击授权,即可用你的github用户进行留言评论。

本文作者:际富
本文地址
http://zhy.one/html/hexo-next-gitment.html
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!