-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
34 lines (32 loc) · 1.03 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
/** @type {import('next').NextConfig} */
import mdx from "@next/mdx";
import remark from "remark-gfm";
import remarkFrontMatter from "remark-frontmatter";
import withMatter from "./src/utils/withMatter.mjs";
import withLayout from "./src/utils/withLayout.mjs";
import rehype from "@mapbox/rehype-prism";
const nextConfig = {
reactStrictMode: true,
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
images: {
domains: [
"img.shields.io",
"avatars.githubusercontent.com",
"media1.giphy.com",
],
},
};
const withMDX = 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: [remarkFrontMatter, remark, withMatter, withLayout],
rehypePlugins: [rehype],
// If you use `MDXProvider`, uncomment the following line.
// providerImportSource: "@mdx-js/react",
providerImportSource: "@mdx-js/react",
},
});
export default withMDX(nextConfig);