Hexo博客私有部署Twikoo评论系统并迁移评论记录(自定义邮件回复模板)

部署

之前一直使用的artalk,现在想改用Twikoo,采用私有部署的方式。

私有部署 (Docker)

端口可以根据实际情况进行修改

docker run --name twikoo -e TWIKOO_THROTTLE=1000 -p 8100:8100 -v ${
   PWD}/data:/app/data -e TWIKOO_PORT=8100 -d imaegoo/twikoo

访问localhost:8100,结果如下则表示部署成功

{
   
    "code": 100,
    "message": "Twikoo 云函数运行正常,请参考 https://twikoo.js.org/frontend.html 完成前端的配置",
    "version": "1.6.39"
}

成功后,如果有域名,使用nginx配置反向代理即可。

Butterfly配置

打开butterfly的主题配置文件_config.yml,启用Twikoo

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: Twikoo
  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

配置环境Id,环境Id就是上一步你访问的地址。

# Twikoo
# https://github.com/imaegoo/twikoo
twikoo:
  envId: https://twikoo.xxx.xxx
  region:
  visitor: false
  option:

如果Twikoo前端版本过低,打开themes/butterfly/plugins.yml配置文件,修改版本。

twikoo:
  name: twikoo
  file: dist/twikoo.all.min.js
  version: 1.6.39

然后Hexo一键三连

Twikoo配置

在你的评论区,点击右下角设置小图片,初始化密码后,就可以进行配置啦!
在这里插入图片描述

迁移评论

首先从原来的评论系统,将评论数据导出,artalk导出是artrans格式。
然后在Twikoo设置中,选择导入,导入数据。
在这里插入图片描述
详细配置可参照Twikoo 文档

自定义邮件样式

PC端和移动端效果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Gzzz__

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值