# vuepress-plugin-giscus

> A plugin for adding comment system Giscus in VuePress 2.

Latest version **2.0.0-alpha.2** (published 2021-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuepress-plugin-giscus
pnpm add vuepress-plugin-giscus
yarn add vuepress-plugin-giscus
bun add vuepress-plugin-giscus
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0-alpha.2 |
| Published | 2021-12-12 |
| First published | 2021-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 370 |
| Author | Renovamen |
| Maintainers | renovamen |
| Keywords | vue, vuepress, vuepress-plugin, comment, giscus |

## Links

- npm: https://www.npmjs.com/package/vuepress-plugin-giscus
- Repository: https://github.com/Renovamen/vuepress-theme-gungnir
- Homepage: https://github.com/Renovamen/vuepress-theme-gungnir/tree/main/packages/plugins/giscus
- Issues: https://github.com/Renovamen/vuepress-theme-gungnir/issues
- npm.io page: https://npm.io/package/vuepress-plugin-giscus

## Recent versions

- 2.0.0-alpha.2 (latest) — 2021-12-12
- 2.0.0-alpha.26 (next) — 2022-08-19
- 2.0.0-alpha.25 — 2022-06-20
- 2.0.0-alpha.24 — 2022-05-29
- 2.0.0-alpha.23 — 2022-05-20
- 2.0.0-alpha.21 — 2022-04-18
- 2.0.0-alpha.20 — 2022-04-13
- 2.0.0-alpha.19 — 2022-03-29
- 2.0.0-alpha.16 — 2022-02-28
- 2.0.0-alpha.10 — 2022-01-24
- 2.0.0-alpha.9 — 2021-12-31
- 2.0.0-alpha.4 — 2021-12-27
- 2.0.0-alpha.3 — 2021-12-25

## README

# vuepress-plugin-giscus@next

Plugin `vuepress-plugin-giscus@next` for adding comment system [Giscus](https://github.com/giscus/giscus) powered by [GitHub Discussions](https://docs.github.com/en/discussions) to [VuePress 2](https://v2.vuepress.vuejs.org/).

[Demo](https://v2-vuepress-theme-gungnir.vercel.app/docs/plugins/giscus.html)


&nbsp;

## Install

```bash
yarn add vuepress-plugin-giscus@next
# or
npm install vuepress-plugin-giscus@next
```


&nbsp;

## Usage

First you need to see [Giscus's website](https://github.com/giscus/giscus) for its details and generate your repo id, category id and other things on the website.

Then add the plugin to your `.vuepress/config.js`:

```js
module.exports = {
  plugins: [
    [
      "vuepress-plugin-giscus", {
        repo: "[repo]",  // required, string, format: user_name/repo_name
        repoId: "[repo id]",  // required, string, generate it on Giscus's website
        category: "[category name]",  // required, string
        categoryId: "[category id]",  // required, string, generate it on Giscus's website
        mapping: "[page <-> discussion mapping]",  // optional, string, default="title"
        reactionsEnabled: "[enable reactions or not?]",  // optional, boolean, default=true
        theme: "[theme]", // optional, string, default="light"
        lang: "[language]",  // optional, string, default="auto" (follow the site's language, fell to "en" if your site's language is not supported by Giscus)
        crossorigin: "[crossorigin]"  // optional, string, default="anonymous"
      }
    ]
  ]
}
```


&nbsp;

## Component

After that, `Giscus` will have already been registered as a Vue component, so you can use it in Vuepress directly. You can also change Giscus' theme, language and enablement on-the-fly by pass props to the component ([how it works](https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md#parent-to-giscus-message-events)):

```md
<Giscus :theme="theme" :lang="lang" :reactionsEnabled="reactionsEnabled" />
```


&nbsp;

## License

[MIT](https://github.com/Renovamen/vuepress-theme-gungnir/blob/main/packages/plugins/giscus/LICENSE)

---
_Source: https://npm.io/package/vuepress-plugin-giscus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
