Skip to content

Comments Waline

Aafff623 edited this page Aug 21, 2026 · 2 revisions

Comments-Waline

本站评论是 Waline,不是关掉、也不是默认 Giscus。

官方出厂(docs/official/03-功能配置/评论系统.md 本站
commentConfig.type 文档写默认 "none" "waline"
决策 docs/adr/0001-waline-over-giscus.md

通用字段(Twikoo/Giscus/…)键表仍以官方文档为准;下面只写本站怎么维护。

配置入口

src/config/commentConfig.ts

关键项:

说明
type 必须为 "waline" 才走本站评论 UI
waline.serverURL 自建 Waline 服务地址(Production 稳定域名;勿用 Preview hash URL)
waline.lang "zh-CN"
waline.emoji 表情包 CDN 列表
waline.login enable / force / disable(匿名与 OAuth 策略)

贴纸建议(stickerSuggest)等扩展以配置文件注释为准;评论大图优先 Cloudflare R2,COS 是兼容链。R2_* / COS_* 等服务端凭据放 Vercel Env,不要写进仓库。

访客侧

  • 文章页 / 留言板等挂载 Waline 客户端
  • 留言板是否开启:siteConfig.pages.guestbook
  • 竹蝉等增强:见 siteConfig 相关开关(以现行配置为准)

改评论系统时

  1. 先读官方 评论系统.md 了解各 provider 字段
  2. 再改本站 commentConfig.ts
  3. 若切回 none 或其它 provider,同步检查留言板与文章 comment FM

不要把官方「默认 none」抄回本站配置,除非你真要关评论。

Clone this wiki locally