主题提供评论支持,将主题选项中的 commentPlugin 作为选项传递。
commentPlugin
目前支持 3 种评论服务:
NOTE
如果不需要评论功能,请忽略此项。
import { defineConfig } from 'vitepress-theme-niansi' export default defineConfig({ themeConfig: { commentPlugin: { provider: 'Waline', options: { serverURL: 'https://your-waline-server.com' } } } })
import { defineConfig } from 'vitepress-theme-niansi' export default defineConfig({ themeConfig: { commentPlugin: { provider: 'Giscus', options: { repo: 'your-github-repo', repoId: 'your-github-repo-id', category: 'your-github-discussion-category', categoryId: 'your-github-discussion-category-id' } } } })
import { defineConfig } from 'vitepress-theme-niansi' export default defineConfig({ themeConfig: { commentPlugin: { provider: 'Twikoo', options: { envId: 'your-twikoo-env-id' } } } })
主题提供评论支持,将主题选项中的
commentPlugin作为选项传递。目前支持 3 种评论服务:
NOTE
如果不需要评论功能,请忽略此项。
Waline
2
3
4
5
6
7
8
9
10
11
12
Giscus
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Twikoo
2
3
4
5
6
7
8
9
10
11
12