在GitHub上新建一个公开仓库,以名为comment的仓库为例。
打开https://github.com/apps/utterances,点击右上角的Configure。

选择可以访问的仓库,选择刚刚创建的comment仓库。

编辑Butterfly主题中的_config.yml文件,位于/themes/butterfly
此配置文件已集成了Disqus、Livere、Gitalk、Valine、Waline、Utterances、Facebook Comments Plugin
、Twikoo、Giscus、Remark42、Artalk等多个评论系统。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
comments:
# Up to two comments system, the first will be shown as default
# Leave it empty if you don't need comments
# Choose: Disqus/Disqusjs/Livere/Gitalk/Valine/Waline/Utterances/Facebook Comments/Twikoo/Giscus/Remark42/Artalk
# Format of two comments system : Disqus,Waline
use: Utterances

# Utterances
# https://utteranc.es/
utterances:
repo: This4Me/comment
# Issue Mapping: pathname/url/title/og:title
issue_term: pathname
# Theme: github-light/github-dark/github-dark-orange/icy-dark/dark-blue/photon-dark
light_theme: github-light
dark_theme: photon-dark
js:
option:

修改comments.useutterances.repo两项。

通过hexo server命令启动服务之后,可以在文章的最下面可以看到评论区。

登录自己的GitHub地址即可评论,评论的内容可以在之前创建的仓库issues中看到。