feat: add rehype-slug for TableOfContents heading IDs
This commit is contained in:
@@ -5,6 +5,7 @@ import remarkMath from 'remark-math'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import rehypePrettyCode from 'rehype-pretty-code'
|
||||
import rehypeKatex from 'rehype-katex'
|
||||
import rehypeSlug from 'rehype-slug'
|
||||
import { getPosts, getPost, getReadingTime } from '@/lib/posts'
|
||||
import { TableOfContents } from '@/components/blog/TableOfContents'
|
||||
import { ScrollToTop } from '@/components/ui/ScrollToTop'
|
||||
@@ -55,6 +56,7 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
|
||||
mdxOptions: {
|
||||
remarkPlugins: [remarkMath, remarkGfm],
|
||||
rehypePlugins: [
|
||||
rehypeSlug,
|
||||
[rehypePrettyCode, { theme: 'github-dark' }],
|
||||
rehypeKatex,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user