Modify styles

* add table of contents plugin
This commit is contained in:
DefectingCat
2022-03-23 21:05:57 +08:00
parent 717eee7d0a
commit 1bb382409b
7 changed files with 95 additions and 6 deletions

View File

@ -1,13 +1,14 @@
import remarkFrontmatter from 'remark-frontmatter';
import mdx from '@next/mdx';
import rehypePrism from '@mapbox/rehype-prism';
import remarkToc from 'remark-toc';
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkFrontmatter],
remarkPlugins: [remarkFrontmatter, remarkToc],
rehypePlugins: [rehypePrism],
// providerImportSource: '@mdx-js/react',
providerImportSource: '@mdx-js/react',
},
});