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 - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

2

package.json
{
"name": "vitepress-plugin-comment-with-giscus",
"version": "1.0.9",
"version": "1.1.0",
"description": "vitepress comment plugin based on giscus",

@@ -5,0 +5,0 @@ "workspaces": [

import giscus from '@giscus/vue';
import { Component, createApp, h, nextTick, onMounted, Ref, watch } from 'vue';
import { PageData, useRoute } from 'vitepress';
import { PageData, Route } from 'vitepress';
import { GiscusProps } from '@giscus/vue/dist/types';
type vitepressAPI = {
frontmatter: Ref<PageData['frontmatter']>,
route: Route
}
/**

@@ -80,10 +85,14 @@ * 添加评论容器

const giscusTalk = (frontmatter: Ref<PageData['frontmatter']>, props: GiscusProps) => {
const route = useRoute();
/**
* 创建评论区
* @param props giscus配置
* @param vitepressObj 前言和路由
*/
const giscusTalk = (props: GiscusProps, vitepressObj: vitepressAPI) => {
onMounted(() => {
setGiscus(props, frontmatter);
setGiscus(props, vitepressObj.frontmatter);
setThemeWatch();
});
watch(() => route.path, () => nextTick(() => {
setGiscus(props, frontmatter);
watch(() => vitepressObj.route.path, () => nextTick(() => {
setGiscus(props, vitepressObj.frontmatter);
}));

@@ -90,0 +99,0 @@ };

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