简体中文
Appearance
Hugo Narrow 主题支持多种评论系统。
在 hugo.yaml 或 frontmatter 中启用评论系统:
hugo.yaml
frontmatter
params: comments: enabled: true # 评论系统总开关 system: "giscus" # 选择评论系统:giscus, disqus, utterances, waline, artalk, twikoo
支持的评论系统如下:
详细的配置可访问对应的系统文档。
params: comments: system: "artalk" artalk: server: "your-artalk-server" # Artalk 服务器地址 site: "your-site-name" # 站点名称 locale: "zh-CN" # 语言 darkMode: "auto" # 暗色模式 gravatar: # Gravatar 配置 mirror: "https://cravatar.cn/avatar/"
params: comments: system: "disqus" disqus: shortname: "your-disqus-shortname"
基于 GitHub Discussions 的评论系统。
params: comments: system: "giscus" giscus: repo: "username/repo" # GitHub 仓库 repoId: "R_xxx" # 仓库 ID category: "General" # 讨论分类 categoryId: "DIC_xxx" # 分类 ID mapping: "pathname" # 映射方式 strict: "0" # 严格匹配 reactionsEnabled: "1" # 启用反应 emitMetadata: "0" # 元数据 inputPosition: "bottom" # 输入框位置 theme: "preferred_color_scheme" # 主题 lang: "zh-CN" # 语言
params: comments: system: "twikoo" twikoo: envId: "your-env-id" # 环境 ID region: "ap-shanghai" # 区域(非必须) path: "window.location.pathname" # 路径 lang: "zh-CN" # 语言
基于 GitHub Issues 的轻量级评论系统。
params: comments: system: "utterances" utterances: repo: "username/repo" # GitHub 仓库 issueTerm: "pathname" # Issue 映射 label: "comment" # Issue 标签 theme: "preferred-color-scheme" # 主题
params: comments: system: "waline" waline: serverURL: "your-waline-server" # Waline 服务器地址 lang: "zh-CN" # 语言
评论系统配置
Hugo Narrow 主题支持多种评论系统。
基础配置
在
hugo.yaml
或frontmatter
中启用评论系统:支持的评论系统如下:
详细的配置可访问对应的系统文档。
Artalk
Disqus
Giscus
基于 GitHub Discussions 的评论系统。
设置步骤
hugo.yaml
Twikoo
Utterances
基于 GitHub Issues 的轻量级评论系统。
Waline