mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
Add markdown style
This commit is contained in:
@ -2,23 +2,27 @@ import remarkFrontmatter from 'remark-frontmatter';
|
||||
import mdx from '@next/mdx';
|
||||
import rehypePrism from '@mapbox/rehype-prism';
|
||||
import remarkToc from 'remark-toc';
|
||||
import composePlugins from 'next-compose-plugins';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import rehypeSlug from 'rehype-slug';
|
||||
|
||||
const withMDX = mdx({
|
||||
extension: /\.mdx?$/,
|
||||
options: {
|
||||
remarkPlugins: [remarkFrontmatter, remarkToc],
|
||||
rehypePlugins: [rehypePrism],
|
||||
providerImportSource: '@mdx-js/react',
|
||||
const composedConfig = composePlugins([
|
||||
mdx({
|
||||
extension: /\.mdx?$/,
|
||||
options: {
|
||||
remarkPlugins: [remarkFrontmatter, remarkToc, remarkGfm],
|
||||
rehypePlugins: [rehypePrism, rehypeSlug],
|
||||
providerImportSource: '@mdx-js/react',
|
||||
},
|
||||
}),
|
||||
/** @type {import('next').NextConfig} */
|
||||
{
|
||||
reactStrictMode: true,
|
||||
// experimental: {
|
||||
// reactMode: 'concurrent',
|
||||
// },
|
||||
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||
},
|
||||
});
|
||||
]);
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
// experimental: {
|
||||
// reactMode: 'concurrent',
|
||||
// },
|
||||
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||
};
|
||||
|
||||
export default withMDX(nextConfig);
|
||||
export default composedConfig;
|
||||
|
Reference in New Issue
Block a user