Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vitepress-plugin-comment-with-giscus

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vitepress-plugin-comment-with-giscus

vitepress comment plugin based on giscus

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

README

EN | 中文文档

vitepress-plugin-comment-with-giscus

vitepress comment section plugin based on giscus

Install

// npm
npm i vitepress-plugin-comment-with-giscus
// yarn
yarn add vitepress-plugin-comment-with-giscus

Usage

// .vitepress/theme/index.js
import DefaultTheme from 'vitepress/theme';
import giscusTalk from 'vitepress-plugin-comment-with-giscus';
import { useData } from 'vitepress';
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

Extended

If the following code is added to the preface of the article, the comment area will not be generated

---
comment: false
---

Keywords

FAQs

Package last updated on 26 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc