Skip to content

Commit 34ef05d

Browse files
committed
chore: read files from articles/[slug]/page.mdx
1 parent 8a5b9ac commit 34ef05d

File tree

11 files changed

+1709
-39
lines changed

11 files changed

+1709
-39
lines changed

mdx-components.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { MDXComponents } from "mdx/types";
2+
3+
export function useMDXComponents(components: MDXComponents): MDXComponents {
4+
return {
5+
...components,
6+
};
7+
}

next.config.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import type { NextConfig } from "next";
2+
import createMDX from "@next/mdx";
23

34
const nextConfig: NextConfig = {
4-
/* config options here */
5+
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
6+
reactStrictMode: true,
57
};
68

7-
export default nextConfig;
9+
const withMDX = createMDX({
10+
// Add markdown plugins here, as desired
11+
});
12+
13+
export default withMDX(nextConfig);

0 commit comments

Comments
 (0)