forked from AvarchLLC/EIPsInsight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
60 lines (52 loc) · 1.52 KB
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// import remarkGfm from "remark-gfm";
// import remarkHighlight from "remark-highlight.js";
// import createMDX from "@next/mdx";
// /** @type {import('next').NextConfig} */
// const nextConfig = {
// // Configure `pageExtensions`` to include MDX files
// pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
// // Optionally, add any other Next.js config below
// };
// const withMDX = createMDX({
// // Add markdown plugins here, as desired
// options: {
// remarkPlugins: [remarkGfm, remarkHighlight],
// rehypePlugins: [],
// },
// });
// // Merge MDX config with Next.js config
import createMDXPlugin from "@next/mdx";
import rehypeRaw from "rehype-raw";
import remarkGfm from "remark-gfm";
import remarkHighlight from "remark-highlight.js";
const withMDX = createMDXPlugin({
extension: /\.mdx$/,
options: {
// These options apply to .mdx fles only
providerImportSource: "@mdx-js/react",
rehypePlugins: [],
remarkPlugins: [remarkGfm, remarkHighlight],
},
});
const withMarkdown = createMDXPlugin({
extension: /\.md$/,
options: {
// These options apply to .md fles only
providerImportSource: "@mdx-js/react",
rehypePlugins: [],
remarkPlugins: [remarkGfm, remarkHighlight],
},
});
const nextConfig = withMDX(
withMarkdown({
compiler: {
styledComponents: true,
},
pageExtensions: ["mdx", "md", "tsx", "ts"],
poweredByHeader: false,
// reactStrictMode: true,
trailingSlash: false,
})
);
export default nextConfig;
// export default withMDX(nextConfig);