个人博客搭建之八:留言系统

theme-next主题支持多个留言系统,尝试后发现[changyang](畅言)系统比较好用。

hexo 官网插件扫描

https://hexo.io/plugins/

  1. hexo-plugin-gitalk

    Hexo 整合 gitalk 组件实现博客评论功能。久未更新(3年)

  2. hexo-plugin-schnack

    Plugin for adding the Schnack comment system to your Hexo Blog. github或Twitter账号登录后可评论

theme-next 主题的多留言系统支持

https://theme-next.js.org/muse/docs/third-party-services/comments.html

Multiple Comment System Support

NexT allows you to enable multiple commenting systems at the same time.

通过主题yml文件可配置使用哪些留言系统。支持的留言系统包括:

  • disqus
  • disqusjs
  • changyan
  • livere
  • gitalk
  • utterances
  • isso
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Multiple Comment System Support
comments:
# Available values: tabs | buttons
style: tabs
# Choose a comment system to be displayed by default
active: changyan
# Setting `true` means remembering the comment system selected by the visitor
storage: true
# Lazyload all comment systems.
lazyload: false
# Modify icons and texts for any style, here are some examples
nav:
#disqus:
# text: Load Disqus
# order: -1
changyan:
order: -1

在某些页面关闭评论

If you want to disable it in one page, just add comments key to front-matter and set its value to false. Like following:

1
2
3
4
title: All tags
type: "tags"
comments: false
---

畅言(云评) | Changyan (China)

畅言云评论是业内领先的社会化评论系统,支持PC和移动端两种接入方式,为网站提供了一种全新的评论方式。云评论拥有多种常用账号登录、三重过滤机制、实时的数据统计、快捷数据导出、全面支持移动端等领先功能。充分满足了当前各大网站对于用户登录、评论、分享 、审核等方面的需求。

  1. Create an account or log into Changyan, then add your site to get APP ID and APP KEY.

注册过程很常规,要填写必要的站点名称和地址,而后会得到ID和密钥。

畅言注册网站
畅言ID+密钥
  1. Set the value enable to true, and add the obtained APP ID (appid) and APP KEY (appkey) to the changyan section in the NexT config file as following: (_config.next.yml)
1
2
3
4
5
# changyan
changyan:
enable: true
appid: your_id
appkey: your_key

效果

更新发布博客系统:

1
2
3
hexo clean
hexo g
hexo d
畅言留言框

支持微信、微博、QQ和手机号登录畅言系统进行留言。