Beaudar

Beaudar 是 Utterances 的中文版本,相比 Utterances 有更多的体验优化,可以按时间倒序排序。

blog/_config.stellar.yml
1
2
3
4
comments:
service: beaudar
beaudar:
repo: xaoxuu/blog-comments

Beaudar 的配置方法很简单,创建一个仓库,在仓库中创建一个 域名白名单文件,然后在 此处 授权安装即可。

utterances

A lightweight comments widget built on GitHub issues. Use GitHub issues for blog comments, wiki pages and more!

blog/_config.stellar.yml
1
2
3
4
comments:
service: utterances
utterances:
repo: xaoxuu/blog-comments

utterances 的配置方法很简单,创建一个仓库,在仓库中创建一个 域名白名单文件,然后在 此处 授权安装即可。

giscus

giscus 是由 GitHub Discussions 驱动的评论系统。让访客借助 GitHub 在你的网站上留下评论和反应吧!本项目受 utterances 强烈启发。

blog/_config.stellar.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
comments:
service: giscus
# giscus
# https://giscus.app/zh-CN
giscus:
src: https://giscus.app/client.js
data-repo: xxx/xxx # [在此输入仓库]
data-repo-id: # [在此输入仓库 ID]
data-category: # [在此输入分类名]
data-category-id:
data-mapping: pathname
data-strict: 0
data-reactions-enabled: 1
data-emit-metadata: 0
data-input-position: top # top, bottom
data-theme: preferred_color_scheme
data-lang: zh-CN
data-loading: lazy
crossorigin: anonymous

Twikoo

blog/_config.stellar.yml
1
2
3
4
comments:
service: twikoo
twikoo:
envId: https://xxx # vercel函数

Waline

blog/_config.stellar.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
comments:
service: waline
waline:
js: https://unpkg.com/@waline/client@v2/dist/waline.js
css: https://unpkg.com/@waline/client@v2/dist/waline.css
# Waline server address url, you should set this to your own link
serverURL: https://xxx # waline 地址
# If false, comment count will only be displayed in post page, not in home page
commentCount: true
# Pageviews count, Note: You should not enable both `waline.pageview` and `leancloud_visitors`.
pageview: false

# Custom locales
locale:
placeholder: # 输入框内提示文字

# Custom emoji
emoji:
- https://gcore.jsdelivr.net/gh/norevi/[email protected]/blobs
# - https://unpkg.com/@waline/[email protected]/weibo
# - https://unpkg.com/@waline/[email protected]/alus
# - https://unpkg.com/@waline/[email protected]/bilibili
# - https://unpkg.com/@waline/[email protected]/qq
# - https://unpkg.com/@waline/[email protected]/tieba
# - https://unpkg.com/@waline/[email protected]/tw-emoji
# - https://unpkg.com/@waline/[email protected]/bmoji

Artalk

blog/_config.stellar.yml
1
2
3
4
5
6
7
8
9
10
comments:
service: artalk
# Artalk
# https://artalk.js.org/
artalk:
css: https://unpkg.com/[email protected]/dist/Artalk.css
js: https://unpkg.com/[email protected]/dist/Artalk.js
server: # 后端服务地址
placeholder: ''
darkMode: auto

评论的灵活用法

评论区懒加载

该功能于 1.29.0 支持。

blog/_config.stellar.yml
1
2
3
comments:
service: # beaudar, utterances, giscus, twikoo, waline, artalk
lazyload: # true

共用评论数据

如果您有多个页面需要共用评论数据,可以在 front-matter 中覆盖评论参数,例如:

blog/source/about/index.md
1
2
3
title: 关于
beaudar:
'issue-term': '留言板'
blog/source/friends/index.md
1
2
3
title: 友链
beaudar:
'issue-term': '留言板'

使用其它评论数据

如果您有多个页面需要另外一个数据库的评论数据,以 Beaudar 为例,您可以这样:

blog/source/wiki/stellar/index.md
1
2
3
4
5
title: 快速开始您的博客之旅
giscus:
data-repo: xaoxuu/hexo-theme-stellar
data-mapping: number
data-term: 226

对于其他评论例如 twikoo waline artalk,您可以设置 comment_id 为相同的值使得不同页面共用同一评论区

blog/source/wiki/stellar/index.md
1
2
title: 快速开始您的博客之旅
comment_id: