feat: add giscus

This commit is contained in:
KazooTTT
2024-10-11 20:07:15 +08:00
parent d2f4fa5fec
commit 4fdafbe98a
11 changed files with 586 additions and 58 deletions

View File

@ -5,6 +5,7 @@ import type { GetStaticPaths, InferGetStaticPropsType } from 'astro'
import PostLayout from '@/layouts/BlogPost.astro'
import { getAllPosts } from '@/utils'
import GiscusComment from '@/components/GiscusComment'
export const getStaticPaths = (async () => {
const blogEntries = await getAllPosts()
@ -22,4 +23,5 @@ const { Content } = await entry.render()
<PostLayout post={entry}>
<Content />
<GiscusComment client:only='react' />
</PostLayout>