Skip to content

Commit ba8d779

Browse files
committed
feat: add Giscus comments component to blog posts for enhanced user engagement
1 parent 0b57b04 commit ba8d779

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

app/components/GiscusComments.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<script setup lang="ts">
2+
import Giscus from '@giscus/vue'
3+
4+
const colorMode = useColorMode()
5+
const theme = computed(() => colorMode.value === 'dark' ? 'dark' : 'light')
6+
</script>
7+
8+
<template>
9+
<Giscus
10+
repo="techwatching/techwatching.dev"
11+
repo-id="R_kgDOGPrzmQ"
12+
category="Announcements"
13+
category-id="DIC_kwDOGPrzmc4B_fVQ"
14+
mapping="pathname"
15+
strict="0"
16+
reactions-enabled="1"
17+
emit-metadata="0"
18+
input-position="top"
19+
:theme="theme"
20+
loading="lazy"
21+
crossorigin="anonymous"
22+
/>
23+
</template>

app/pages/posts/[slug].vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ if (post.value.image?.src) {
8686
<USeparator v-if="surround?.length" />
8787

8888
<UContentSurround :surround="surround" />
89+
90+
<GiscusComments />
8991
</UPageBody>
9092

9193
<template

0 commit comments

Comments
 (0)