Gitment评论插件的使用
- Gitment模块
- Gitment 是基于 GitHub Issues 的评论系统。
- 支持在前端直接引入,不需要任何后端代码。
- 可以在页面进行登录、查看、评论、点赞等操作.
- 同时有完整的 Markdown / GFM 和代码高亮支持。
- 尤为适合各种基于 GitHub Pages 的静态博客或项目页面。
- 想了解具体效果,可以点击查看官方Demo Page:Gitment Demo。
- 注册 OAuth Application
首先在点击注册自己OAuth Application
填写相关信息,注意:在Authorization callback URL填自己的网站url,例如我的https://climbsnail.github.io
创建成功后,你会得到一个
client ID
和一个client secret
,这个将被用于之后的用户登录。
- 修改yilia的配置文件
_config.yml
1
2
3
4
5
6
7
8#5、Gitment
gitment_owner: ClimbSnail #你的 GitHub ID
gitment_repo: 'Gitment' #存储评论的 repo
gitment_oauth:
client_id: '' #client ID
client_secret: '' #client secret
# 其中的client ID 和 client secret换成你自己的就行了。
Hexo搭建博客系列教程
- Hexo搭建博客系列教程1__hexo+Github搭建个人静态博客
- Hexo搭建博客系列教程2__Hexo安装配置yilia主题
- Hexo搭建博客系列教程3__yilia主题添加网易云音乐插件
- Hexo搭建博客系列教程4__yilia主题添加Gitment评论插件
- Hexo搭建博客系列教程5__让搜索引擎收录博客