Hexo-NexT添加gitment评论

注册OAuth Application

登录自己的github账号,注册OAuth Application


下面是我建的app。点击new OAuth app,如下进行设置:


注意:

1.要确保填入正确的 callback URL(一般是网站的域名)
2.你会得到一个client ID和一个client secret,这个将被用于之后的用户登录。

配置_config.yml

搜索gitment,进行相关配置:

1
2
3
4
5
6
7
8
9
10
11
gitment:
enable: true
mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway
count: true # Show comments count in post meta area
lazy: false # Comments lazy loading with a button
cleanly: true # Hide 'Powered by ...' on footer, and more
language: zh-Hans # Force language, or auto switch by theme
github_user: wangc1993 # MUST HAVE, Your Github ID
github_repo: gitment-blog # MUST HAVE, The repo you use to store Gitment comments
client_id: client ID # MUST HAVE, Github client id for the Gitment
client_secret: client secret # EITHER this or proxy_gateway, Github access secret token for the Gitment

-----------------------本文结束感谢您的阅读-----------------------
坚持原创技术分享,您的支持将鼓励我继续创作!
0%