-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
44 lines (40 loc) · 1.08 KB
/
Copy pathnext.config.ts
File metadata and controls
44 lines (40 loc) · 1.08 KB
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
import type { NextConfig } from "next";
import path from "node:path";
import createMDX from "@next/mdx";
const cwd = process.cwd();
const remarkExperienceCards = path.join(cwd,"src/lib/remark-experience-cards.mts");
const remarkMediaSplit = path.join(cwd, "src/lib/remark-media-split.mts");
const remarkIframe = path.join(cwd, "src/lib/remark-iframe.mts");
const nextConfig: NextConfig = {
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
reactCompiler: true,
};
const withMDX = createMDX({
extension: /\.(md|mdx)$/,
options: {
remarkPlugins: [
"remark-gfm",
"remark-frontmatter",
["remark-mdx-frontmatter", { name: "metadata" }],
"remark-directive",
remarkIframe,
remarkExperienceCards,
remarkMediaSplit,
],
rehypePlugins: [
"rehype-slug",
"rehype-mdx-import-media",
[
"rehype-pretty-code",
{
theme: {
dark: "github-dark",
light: "github-light",
},
keepBackground: false,
},
],
],
},
});
export default withMDX(nextConfig);