Skip to content

Commit

Permalink
Enable blog comment feature and configure Giscus parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mobeicanyue committed Apr 29, 2024
1 parent 7525e75 commit b42e6a7
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions source/_posts/Enable-blog-comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,33 @@ tags:
3. Discussions 功能已在你的仓库中启用。
```

1. 先确保你的仓库是公开的,如果不是,可以在仓库的 Settings 里面修改。或者创建一个新的公开仓库,用来存放博客的评论。
### 1.1 仓库公开

先确保你的仓库是公开的,如果不是,可以在仓库的 Settings 里面修改。或者创建一个新的公开仓库,用来存放博客的评论。
![修改仓库为公开](https://pic1.zhimg.com/80/v2-f6a7d078b2bba550b711d0842a50a510_1440w.webp)

2. 安装 giscus app,点击 [giscus app](https://github.com/apps/giscus) 按钮,跳转到 GitHub 的安装页面,点击 `Install` 按钮,选择你的仓库,安装成功后,会跳转回 Giscus 配置页面。
### 1.2 安装 giscus app

安装 giscus app,点击 [giscus app](https://github.com/apps/giscus) 按钮,跳转到 GitHub 的安装页面,点击 `Install` 按钮,选择你的仓库,安装成功后,会跳转回 Giscus 配置页面。
![安装 giscus app](https://pic1.zhimg.com/80/v2-48fbbe27f37257b728b6a51c18582e18_1440w.webp)
![选择仓库](https://pic4.zhimg.com/80/v2-e1175a1a8532fad2e0e65e0a1728ed1b_1440w.webp)
![安装成功](https://pic4.zhimg.com/80/v2-9ff4af2af602fe3d8b26b9e9e1b46b47_1440w.webp)

3. 启用 Discussions 功能,点击仓库的 `Settings`,在 `Features` 选项卡下,勾选 `Discussions`
### 1.3 启用 Discussions 功能

4. 配置 giscus 参数
![配置 giscus 参数](https://pic3.zhimg.com/80/v2-3ab1980b9fe5b4569f9c4a83ee39854a_1440w.webp)
![配置 giscus 参数](https://pic2.zhimg.com/80/v2-2d04b343bbeac93921c736e6c040f5d9_1440w.webp)
> 输出 Discussion 的元数据 不知道是什么选项就没有开,有懂的评论区说一下。
启用 Discussions 功能,点击仓库的 `Settings`,在 `Features` 选项卡下,勾选 `Discussions`.

现在我们就满足他的要求了
![配置成功](https://pic2.zhimg.com/80/v2-87f6a97a98bd253ff8fd78b89115aa0d_1440w.webp)

此时来到下面,这个 `script` 标签就会显示你相应的参数。

### 1.4 配置 Giscus 参数

下面我们来配置 Giscus 的参数。
![配置 giscus 参数](https://pic3.zhimg.com/80/v2-3ab1980b9fe5b4569f9c4a83ee39854a_1440w.webp)
![配置 giscus 参数](https://pic2.zhimg.com/80/v2-2d04b343bbeac93921c736e6c040f5d9_1440w.webp)

配置完毕之后滑到下面,这个 `script` 标签会显示你相应的参数。
![参数列表](https://pic3.zhimg.com/80/v2-f130a5c4da97dbd1704254cb5098471a_1440w.webp)

## 2. 配置 comment 参数
Expand Down

0 comments on commit b42e6a7

Please sign in to comment.