diff --git a/src/app/blog/[id]/page.tsx b/src/app/blog/[id]/page.tsx index 149c670..a3c7f7c 100644 --- a/src/app/blog/[id]/page.tsx +++ b/src/app/blog/[id]/page.tsx @@ -61,19 +61,20 @@ function TableOfContents({ headings: { text: string; level: number; slug: string }[]; }) { return ( -
-

+
+

目录

); -} +} \ No newline at end of file diff --git a/src/data/blogPosts.ts b/src/data/blogPosts.ts index 13750c1..5618af9 100644 --- a/src/data/blogPosts.ts +++ b/src/data/blogPosts.ts @@ -1305,7 +1305,7 @@ GraphQL是一种用于API的查询语言,也是一个运行时。它的主要特 1. 定义Schema: -\`\`\` +\`\`\`javascript type Query { getPost(id: ID!): Post getAllPosts: [Post] @@ -1343,7 +1343,7 @@ input PostInput { 2. 使用Apollo Client: -\`\`\` +\`\`\`javascript import { ApolloClient, InMemoryCache, ApolloProvider, useQuery, useMutation } from '@apollo/client'; const client = new ApolloClient({