Update table of contents

This commit is contained in:
Defectink
2022-04-01 15:15:38 +08:00
parent d68b4523ef
commit 11fcb9677f
7 changed files with 71 additions and 39 deletions

View File

@ -1,7 +1,7 @@
import remarkFrontmatter from 'remark-frontmatter';
import mdx from '@next/mdx';
import rehypePrism from '@mapbox/rehype-prism';
import remarkToc from 'remark-toc';
// import remarkToc from 'remark-toc';
import composePlugins from 'next-compose-plugins';
import remarkGfm from 'remark-gfm';
import rehypeSlug from 'rehype-slug';
@ -12,7 +12,7 @@ const composedConfig = composePlugins([
options: {
remarkPlugins: [
remarkFrontmatter,
() => remarkToc({ maxDepth: 2 }),
// [remarkToc, { maxDepth: 2 }],
remarkGfm,
],
rehypePlugins: [rehypePrism, rehypeSlug],