Skip to content

畅言、Disqus、Gitment、码云评论配置

思伟 edited this page Jul 25, 2019 · 1 revision

yilia-plus提供畅言 Disqus Gitment 码云评论四种第三方评论,其设置均在_config.yml

# 1、畅言
changyan_appid: false
changyan_conf: false

# 2、Disqus 在hexo根目录的config里也有disqus_shortname字段,优先使用yilia-plus的
disqus: false

# 3、Gitment----基于GitHub的评论系统(关闭请设置gitment_owner为false)
# 关于如何集成:https://www.jianshu.com/p/ac7658cc912f
#gitment_owner: false      #你的 GitHub ID
gitment_owner: JoeyBling      #你的 GitHub ID
gitment_remote: false  # 是否使用官方js(false可以提升访问速度)
gitment_repo: 'yilia-plus-demo'          #存储评论的 repo
gitment_oauth:
  client_id: ''           #client ID
  client_secret: ''       #client secret

# 4、Giteement----【国内用户建议使用这个,相对比较快】
# 关于如何集成:https://www.jianshu.com/p/f5c4633524c7
# 基于码云的评论系统(https://gitee.com/zhousiwei/giteement)
giteement:
  enable: false  # 是否启用码云评论系统
  # 是否使用官方js(false可以提升访问速度)
  remote: false
  redirect_uri: https://zhousiwei.gitee.io/   # 应用回调地址(请和配置的第三方应用保持一致)
  # oauth_uri: https://zhousiwei.gitee.io/
  # 不能更改(网上开源项目https://github.com/Rob--W/cors-anywhere作者提供的专门用来跨域服务器的配置)
  oauth_uri: https://cors-anywhere.herokuapp.com/https://gitee.com/oauth/token
  giteeID: zhousiwei  # 你的码云账号英文名
  # 存储评论的 repo
  repo: zhousiwei
  gitment_oauth:
    client_id: ''           #client ID
    client_secret: ''       #client secret

1、我该选哪种?

  • 畅言 - 搜狐提供的评论组件,功能丰富,体验优异;但必须进行域名备案。只要域名备过案就可以通过审核,也就是说:可以在其他IDC备案然后解析到Github Page。虽然这样做可能会被注销备案,但却是是可行的。

  • Disqus - 国外使用较多的评论组件。万里长城永不倒,一枝红杏出墙来,你懂的。

  • Gitment - Gitment 是一位作者实现的一款基于 GitHub Issues 的评论系统。支持在前端直接引入,不需要任何后端代码。可以在页面进行登录、查看、评论、点赞等操作,同时有完整的 Markdown / GFM 和代码高亮支持。尤为适合各种基于 GitHub Pages 的静态博客或项目页面。

  • 码云评论 - giteement系统是基于gitment的源码开发和扩展的 ➡️ https://gitee.com/zhousiwei/giteement

2、配置

Clone this wiki locally