Skip to content

Commit 14c3600

Browse files
committed
fix(comments): add key to reload dom on page change
1 parent 8b16310 commit 14c3600

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: .vitepress/theme/components/Comments.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { computed, onMounted, ref } from 'vue';
33
import { useData } from 'vitepress';
44
import Giscus from '@giscus/vue';
55
6-
const { isDark, frontmatter } = useData();
6+
const { isDark, frontmatter, title } = useData();
77
88
// Theme based on dark mode
99
const theme = computed(() => (isDark.value ? 'transparent_dark' : 'light'));
@@ -27,7 +27,7 @@ onMounted(() => {
2727
<!-- Spacer div for styling -->
2828
<div style="margin-top: 2rem" />
2929
<!-- Giscus component widget for embedding GitHub discussions -->
30-
<div class="comments-giscus-container">
30+
<div :key="title" class="comments-giscus-container">
3131
<Giscus
3232
id="comments"
3333
repo="gamedig/gamedig.github.io"

0 commit comments

Comments
 (0)