0%

hexo next 评论功能

评论功能

修改 themes/next/_config.yml 文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
gitalk:
- enable: false
- github_id: # GitHub repo owner
- repo: # Repository name to store issues
- client_id: # GitHub Application Client ID
- client_secret: # GitHub Application Client Secret
- admin_user: # GitHub repo owner and collaborators, only these guys can initialize gitHub issues
- distraction_free_mode: true # Facebook-like distraction free mode
- # Gitalk's display language depends on user's browser or system environment
- # If you want everyone visiting your site to see a uniform language, you can set a force language value
- # Available values: en | es-ES | fr | ru | zh-CN | zh-TW
- language:
+ enable: true
+ github_id: nianwu # GitHub repo owner
+ repo: golb-gitalk # Repository name to store issues
+ client_id: xxxxxxxxx # GitHub Application Client ID
+ client_secret: xxxxxxxxxxxxxxxxxxxxxx # GitHub Application Client Secret
+ admin_user: nianwu # GitHub repo owner and collaborators, only these guys can initialize gitHub issues
+ distraction_free_mode: true # Facebook-like distraction free mode
+ # When the official proxy is not available, you can change it to your own proxy address
+ # proxy: https://cors-anywhere.herokuapp.com/https://github.com/login/oauth/access_token # This is official proxy adress
+ # Gitalk's display language depends on user's browser or system environment
+ # If you want everyone visiting your site to see a uniform language, you can set a force language value
+ # Available values: en | es-ES | fr | ru | zh-CN | zh-TW
+ language: zh-CN

ps: 其中的 proxy 选项是为了让国内能够使用评论功能, 但是此项目部署在 github, 所以能够看到博客的人不会需要代理, 故而此选项注释

参考文档