Add table of contents style

This commit is contained in:
Defectink
2022-03-28 11:43:21 +08:00
parent 3612df3c60
commit fac934eee2
3 changed files with 31 additions and 31 deletions

View File

@ -10,7 +10,11 @@ const composedConfig = composePlugins([
mdx({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkFrontmatter, remarkToc, remarkGfm],
remarkPlugins: [
remarkFrontmatter,
() => remarkToc({ maxDepth: 2 }),
remarkGfm,
],
rehypePlugins: [rehypePrism, rehypeSlug],
providerImportSource: '@mdx-js/react',
},