mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
Add prism
* add atom code theme * change nextjs config to mjs * add remark and rehype plugins
This commit is contained in:
23
next.config.mjs
Normal file
23
next.config.mjs
Normal file
@ -0,0 +1,23 @@
|
||||
import remarkFrontmatter from 'remark-frontmatter';
|
||||
import mdx from '@next/mdx';
|
||||
import rehypePrism from '@mapbox/rehype-prism';
|
||||
|
||||
const withMDX = mdx({
|
||||
extension: /\.mdx?$/,
|
||||
options: {
|
||||
remarkPlugins: [remarkFrontmatter],
|
||||
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);
|
Reference in New Issue
Block a user