Add support for markdown

This commit is contained in:
Kamran Ahmed
2021-08-20 15:55:39 +02:00
parent a85497d7e7
commit c37297f822
3 changed files with 5240 additions and 2 deletions

View File

@ -1,4 +1,24 @@
module.exports = {
const path = require('path');
const rehypePrism = require('@mapbox/rehype-prism');
const withMDX = require('@next/mdx')({
extension: /\.(md|mdx)?$/,
options: {
rehypePlugins: [rehypePrism]
}
});
let nextConfig = {
reactStrictMode: true,
poweredByHeader: false,
}
webpack(config, options) {
config.resolve.modules.push(path.resolve('./'));
return config;
}
};
nextConfig = withMDX(nextConfig);
module.exports = nextConfig;

View File

@ -13,6 +13,10 @@
"@chakra-ui/react": "^1.6.5",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@mapbox/rehype-prism": "^0.7.0",
"@mdx-js/loader": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"@next/mdx": "^11.1.0",
"framer-motion": "^4.1.17",
"next": "^11.1.0",
"react": "17.0.2",

5214
yarn.lock Normal file

File diff suppressed because it is too large Load Diff