Skip to content

Commit

Permalink
add missing mdx-components.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
alessbell committed Sep 13, 2023
1 parent 9735f63 commit d089058
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { MDXComponents } from 'mdx/types'

// This file allows you to provide custom React components
// to be used in MDX files. You can import and use any
// React component you want, including components from
// other libraries.

// This file is required to use MDX in `app` directory.
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
// Allows customizing built-in components, e.g. to add styling.
// h1: ({ children }) => <h1 style={{ fontSize: "100px" }}>{children}</h1>,
...components,
}
}
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const nextConfig = {
swcMinify: true,
experimental: {
scrollRestoration: true,
mdxRs: true,
},
webpack: (config) => {
config.experiments = {
Expand Down

0 comments on commit d089058

Please sign in to comment.