vitepress-plugin-comment-with-giscus
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "vitepress-plugin-comment-with-giscus", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "vitepress comment plugin based on giscus", | ||
@@ -22,3 +22,4 @@ "workspaces": [ | ||
"dist", | ||
"src" | ||
"src", | ||
"README_zh.md" | ||
], | ||
@@ -25,0 +26,0 @@ "repository": { |
# README | ||
EN | [中文文档](README_zh.md) | ||
## vitepress-plugin-comment-with-giscus | ||
![](demo.png) | ||
> `vitepress` comment section plugin based on `giscus` | ||
## Install | ||
```shell | ||
// npm | ||
npm i vitepress-plugin-comment-with-giscus | ||
// yarn | ||
yarn add vitepress-plugin-comment-with-giscus | ||
``` | ||
## Usage | ||
```ts | ||
// .vitepress/theme/index.js | ||
export default { | ||
...DefaultTheme, | ||
enhanceApp(ctx) { | ||
DefaultTheme.enhanceApp(ctx); | ||
// ... | ||
}, | ||
setup() { | ||
// Get frontmatter | ||
const { frontmatter } = useData(); | ||
// Comment component | ||
giscusTalk(frontmatter, { | ||
repo: 'your github repository', | ||
repoId: 'your repository id', | ||
categoryId: 'your category id', | ||
mapping: 'pathname' | ||
}); | ||
} | ||
}; | ||
``` | ||
For the parameter acquisition method of `giscus`, please refer to:[giscus configuration](https://giscus.app/) | ||
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9741
6
47
0