VuePress 生态系统VuePress 生态系统
  • 主题指南
  • 默认主题
  • Hope 主题
  • Plume 主题
  • Reco 主题
  • 功能插件
  • Markdown 插件
  • 搜索插件
  • 博客插件
  • 渐进式应用插件
  • 统计分析插件
  • 搜索引擎优化插件
  • 开发插件
  • 工具插件
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • 主题指南
  • 默认主题
  • Hope 主题
  • Plume 主题
  • Reco 主题
  • 功能插件
  • Markdown 插件
  • 搜索插件
  • 博客插件
  • 渐进式应用插件
  • 统计分析插件
  • 搜索引擎优化插件
  • 开发插件
  • 工具插件
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • 博客
    • 指南
    • 配置
  • 评论
    • 指南
    • Giscus
    • Waline
    • Artalk
    • Twikoo
  • Feed
    • 指南
    • 插件配置
    • Frontmatter 配置
    • 频道设置
    • Feed 获取器

Giscus

Giscus 是一个基于 GitHub Discussion 的评论系统,启用简便。

准备工作

  1. 你需要创建一个公开仓库,并开启评论区,以作为评论存放的地点

  2. 你需要安装 Giscus App,使其有权限访问对应仓库。

  3. 在完成以上步骤后,请前往 Giscus 页面 获得你的设置。

    你只需要填写仓库和 Discussion 分类,之后滚动到页面下部的 “启用 giscus” 部分,获取 data-repo, data-repo-id, data-category 和 data-category-id 这四个属性。

配置

请配置 provider: "Giscus" 并将 data-repo, data-repo-id, data-category 和 data-category-id 作为插件选项传入 repo, repoId, category categoryId。

其他的配置项详见 Giscus 配置。

主题

默认情况下,Giscus 使用 light 或 dark 主题 (基于夜间模式状态)。

夜间模式

为了能使 Giscus 应用正确的主题,你需要为 <CommentService /> 通过 darkmode 属性传入一个布尔值,代表当前是否开启夜间模式。

如果你想在日间模式和夜间模式下自定义主题,你可以设置 lightTheme 和 darkTheme 选项,使用内置主题关键字或以 https:// 开头的自定义 css 链接。

在 GitHub 上编辑此页
上次更新: 2025/1/10 18:07
贡献者: Mister-Hope
Prev
指南
Next
Waline