title | head | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
VitePress 添加 Giscu评论 |
|
::: code-group
npm i vitepress-plugin-comment-with-giscus
pnpm i vitepress-plugin-comment-with-giscus
yarn add vitepress-plugin-comment-with-giscus
:::
在.vitepress/theme
下创建index.js
或者index.ts
文件
<<< @/code/giscus.ts
如果文章前言添加以下代码,则不会生成评论区
---
comment: false
---