Files
DefectingCat.github.io/next.config.mjs
DefectingCat 1bb382409b Modify styles
* add table of contents plugin
2022-03-23 21:05:57 +08:00

25 lines
611 B
JavaScript

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, remarkToc],
rehypePlugins: [rehypePrism],
providerImportSource: '@mdx-js/react',
},
});
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// experimental: {
// reactMode: 'concurrent',
// },
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
};
export default withMDX(nextConfig);