mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-24 03:01:31 +08:00
feat: add giscus
This commit is contained in:
@ -9,6 +9,7 @@ import Pagination from '@/components/Paginator.astro'
|
||||
import PostPreview from '@/components/blog/PostPreview.astro'
|
||||
import PageLayout from '@/layouts/BaseLayout.astro'
|
||||
import { getAllPosts, getUniqueCategories, getUniqueTags, sortMDByDate } from '@/utils'
|
||||
import GiscusComment from '@/components/GiscusComment'
|
||||
|
||||
export const getStaticPaths = (async ({ paginate }) => {
|
||||
const allPosts = await getAllPosts()
|
||||
@ -166,4 +167,5 @@ const paginationProps = {
|
||||
)
|
||||
}
|
||||
</div>
|
||||
<GiscusComment client:only='react' />
|
||||
</PageLayout>
|
||||
|
@ -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>
|
||||
|
@ -12,6 +12,7 @@ import kazootttAvatar from '../assets/kazoottt-avatar.jpeg'
|
||||
|
||||
import { getAllPosts, sortMDByDate } from '@/utils'
|
||||
import { Icon } from 'astro-icon/components'
|
||||
import GiscusComment from '@/components/GiscusComment'
|
||||
|
||||
const frontend = ['react(熟悉)', 'vue2(了解)', 'next.js', 'tailwindcss']
|
||||
const backend = ['nodejs(熟悉)', 'python(了解)', 'elysiajs', 'nextjs', 'cloudflare d1', 'prisma']
|
||||
@ -130,4 +131,5 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
|
||||
</div>
|
||||
</Section>
|
||||
</div>
|
||||
<GiscusComment client:only='react' />
|
||||
</PageLayout>
|
||||
|
@ -2,6 +2,7 @@
|
||||
import PageLayout from '@/layouts/BaseLayout.astro'
|
||||
import ToolSection from '@/components/ToolSection.astro'
|
||||
import Button from '@/components/Button.astro'
|
||||
import GiscusComment from '@/components/GiscusComment'
|
||||
|
||||
const DESIGN = [
|
||||
{
|
||||
@ -112,4 +113,5 @@ const Divices = [
|
||||
<ToolSection title='Devices' tools={Divices} />
|
||||
</div>
|
||||
</div>
|
||||
<GiscusComment client:only='react' />
|
||||
</PageLayout>
|
||||
|
Reference in New Issue
Block a user