chore: initial mdx integration

This commit is contained in:
Refansa 2024-08-03 10:42:25 +07:00
parent c3bb3627d7
commit 7bd2e47024
4 changed files with 1336 additions and 10 deletions

View File

@ -1,4 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
import nextMDX from '@next/mdx'
export default nextConfig;
const withMDX = nextMDX()
/** @type {import('next').NextConfig} */
const nextConfig = {
// Configure `pageExtensions` to include MDX files
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
experimental: {
// Use the mdx rust compiler
mdxRs: true,
},
}
export default withMDX(nextConfig)

View File

@ -22,10 +22,14 @@
},
"dependencies": {
"@icons-pack/react-simple-icons": "^9.6.0",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^14.2.5",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@react-spring/web": "^9.7.4",
"@types/mdx": "^2.0.13",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.408.0",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
import type { MDXComponents } from 'mdx/types'
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
...components,
}
}