Skip to content

Commit

Permalink
fix: refresh comment when switch page (#16)
Browse files Browse the repository at this point in the history
closes: #15
  • Loading branch information
northword authored May 6, 2024
1 parent cc5bdbd commit 95c93c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .vitepress/theme/components/Giscus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
import Giscus from "@giscus/vue";
// import "../styles/giscus.dark.css";
// import "../styles/giscus.light.css";
import { useData } from "vitepress";
const { frontmatter, title } = useData();
</script>

<template>
<div class="comments-container">
<div
v-if="frontmatter.comments !== false"
:key="title"
class="comments-container"
>
<Giscus
id="comments"
repo="zotero-chinese/wiki"
Expand Down
4 changes: 0 additions & 4 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import DefaultTheme from "vitepress/theme";
// CSS
import "./styles/vars.css";

// twoslash
// import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
// import "@shikijs/vitepress-twoslash/style.css";

// Components
import HomeSponsors from "./components/HomeSponsors.vue";
// import AsideSponsors from "./components/AsideSponsors.vue";
Expand Down

0 comments on commit 95c93c7

Please sign in to comment.