使用giscus实现静态博客无后台评论系统
# 基于GisCus实现静态博客无后台评论系统
# 搭建效果
<script src="https://giscus.app/client.js"
data-repo="wuxin0011/blog-giscus-comment"
data-repo-id="R_kgDOJADaHw"
data-category="Announcements"
data-category-id="DIC_kwDOJADaH84CUUwQ"
data-mapping="pathname"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-theme="preferred_color_scheme"
data-lang="zh-CN"
crossorigin="anonymous"
async>
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// config.ts
commentPlugin({
provider: "Giscus",
repo: 'wuxin0011/blog-giscus-comment',
repoId:'R_kgDOJADaHw', // id
category:'Announcements',
categoryId:'DIC_kwDOJADaH84CUUwQ', // id
mapping:'pathname', // url
strict:0,
lazyLoading:true,
reactionsEnabled:true,
inputPosition:'bottom',// top | bottom
lightTheme:'dark',
lang:'zh-CN'
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 问题
创建过程中可能会创建失败!这个时候需要卸载GisCus (opens new window) 重新安装,然后再试试添加,本人就是这个问题,卸载之后重新问题就解决了!
编辑 (opens new window)
上次更新: 2024-05-21, 09:50:09