refactor: use mdx for content
- less dependencies - no need for gray-matter - no need for extra utils and interactions with filesystem
This commit is contained in:
parent
b1aa7f7550
commit
6daa1a6d03
19 changed files with 603 additions and 644 deletions
|
|
@ -1,3 +1,16 @@
|
|||
const withMDX = require("@next/mdx")({
|
||||
extension: /\.mdx?$/,
|
||||
options: {
|
||||
// If you use remark-gfm, you'll need to use next.config.mjs
|
||||
// as the package is ESM only
|
||||
// https://github.com/remarkjs/remark-gfm#install
|
||||
remarkPlugins: [],
|
||||
rehypePlugins: [],
|
||||
// If you use `MDXProvider`, uncomment the following line.
|
||||
// providerImportSource: "@mdx-js/react",
|
||||
},
|
||||
});
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
|
|
@ -5,7 +18,8 @@ const nextConfig = {
|
|||
experimental: {
|
||||
newNextLinkBehavior: true,
|
||||
scrollRestoration: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
module.exports = withMDX(nextConfig);
|
||||
|
|
|
|||
Reference in a new issue