前言 {#前言}
Hexo博客支持的评论系统其实有很多,本站选用了Valine,选择原因:轻量级、访问速度快、配置过程简单,以上三个原因足够我选择它了。
Valine评论系统的配置其实很简单,在这里就简单介绍一下。
操作流程 {#操作流程}
-
注册帐号
在LeanCloud官网(https://www.leancloud.cn/)免费注册一个帐号,注册后需要实名认证即可使用不同的服务了。 -
创建应用
- 点击左上角
LeanCloud
后选择创建应用
- 填写
应用名称
- 默认选择
开发版
- 自行选择是否填写应用描述
- 最后点击
创建
按钮
-
修改配置
打开_config.butterfly.yml
配置,找到valine配置,修改appid
和appkey
|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
1 2 3 4 5 6 7 8 9 10
|# valine # https://valine.js.org valine: appId: 请在这里填写你的appId # leancloud application app id appKey: 请在这里填写你的appKey # leancloud application app key avatar: monsterid # gravatar style https://valine.js.org/#/avatar serverURLs: # This configuration is suitable for domestic custom domain name users, overseas version will be automatically detected (no need to manually fill in) bg: # valine background visitor: false option:
|同时修改选择的评论系统为
Valine
即可|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
1 2 3 4 5 6 7 8 9 10
|comments: # Up to two comments system, the first will be shown as default # Choose: Disqus/Disqusjs/Livere/Gitalk/Valine/Waline/Utterances/Facebook Comments/Twikoo/Giscus/Remark42/Artalk use: Valine # 请在这里选择你的评论系统类型:Valine,Disqus text: true # Display the comment name next to the button # lazyload: The comment system will be load when comment element enters the browser's viewport. # If you set it to true, the comment count will be invalid lazyload: false count: false # Display comment count in post's top_img card_post_count: false # Display comment count in Home Page
| -
重新生成博客系统即可看到效果
|---------------|-------------------------------| |
1 2 3
|hexo cl hexo g hexo s
|