首先在DaoVoice注册个账号,点击->邀请码是869d7786
修改/themes/next/layout/_partials/head.swig
文件,
{% if theme.daovoice %}
<script>
(function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/0f81ff2f.js","daovoice")
daovoice('init', {
app_id: "{{theme.daovoice_app_id}}"
});
daovoice('update');
</script>
{% endif %}
注意//widget.daovoice.io/widget/后面加自己的app_id号码
放在图示位置上
在blog\themes\next\_config.yml
文件中添加内容:
# Online contact
daovoice: true
daovoice_app_id: # 这里填你刚才获得的 app_id
安装成功后可以在DaoVoice 控制台上的聊天设置里设置聊天窗口样式,附上我的设置