Add prism

* add atom code theme
* change nextjs config to mjs
* add remark and rehype plugins
This commit is contained in:
Defectink
2022-03-23 16:02:39 +08:00
parent 5b55b84818
commit 332cc905df
11 changed files with 2579 additions and 42 deletions

23
next.config.mjs Normal file
View 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);