Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
vitepress-plugin-comment-with-giscus
Advanced tools
Readme
EN | 中文文档
vitepress
comment section plugin based ongiscus
// npm
npm i vitepress-plugin-comment-with-giscus
// yarn
yarn add vitepress-plugin-comment-with-giscus
// .vitepress/theme/index.js
import DefaultTheme from 'vitepress/theme';
import giscusTalk from 'vitepress-plugin-comment-with-giscus';
import { useData, useRoute } from 'vitepress';
export default {
...DefaultTheme,
enhanceApp(ctx) {
DefaultTheme.enhanceApp(ctx);
// ...
},
setup() {
// Get frontmatter and route
const { frontmatter } = useData();
const route = useRoute();
// Obtain configuration from: https://giscus.app/
giscusTalk({
repo: 'your github repository',
repoId: 'your repository id',
category: 'your category', // default: `General`
categoryId: 'your category id',
mapping: 'pathname', // default: `pathname`
inputPosition: 'top', // default: `top`
lang: 'en', // default: `zh-CN`
lightTheme: 'light', // default: `light`
darkTheme: 'transparent_dark', // default: `transparent_dark`
// ...
}, {
frontmatter, route
},
// Whether to activate the comment area on all pages.
// The default is true, which means enabled, this parameter can be ignored;
// If it is false, it means it is not enabled.
// You can use `comment: true` preface to enable it separately on the page.
true
);
}
};
For the parameter acquisition method of giscus
, please refer to:giscus configuration
When the configuration option enables the comment area by default, add the following code, the comment area will not be generated
---
comment: false
---
When the configuration options do not enable the comment area by default, you can still enable the comment area on the current page through the following code
---
comment: true
---
v1.1.10
Now customizable day/night themes
v1.1.9
You can now set whether to enable configuration globally by default
You may be interested in these plugins: Click me to view more vitepress plugins
FAQs
vitepress comment plugin based on giscus
The npm package vitepress-plugin-comment-with-giscus receives a total of 63 weekly downloads. As such, vitepress-plugin-comment-with-giscus popularity was classified as not popular.
We found that vitepress-plugin-comment-with-giscus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.