diff --git a/packages/next-mdx/readme.md b/packages/next-mdx/readme.md index 250906682e3b..2b7941901d2c 100644 --- a/packages/next-mdx/readme.md +++ b/packages/next-mdx/readme.md @@ -51,7 +51,8 @@ module.exports = withMDX({ }) ``` -Optionally you can match other file extensions for MDX compilation, by default only `.mdx` is supported +By default MDX will only match and compile MDX files with the `.mdx` extension. +However, it can also be optionally configured to handle markdown files with the `.md` extension, as shown below: ```js // next.config.js @@ -61,6 +62,8 @@ const withMDX = require('@next/mdx')({ module.exports = withMDX() ``` +In addition, MDX can be customized with compiler options, see the [mdx documentation](https://mdxjs.com/packages/mdx/#compilefile-options) for details on supported options. + ## Top level .mdx pages Define the `pageExtensions` option to have Next.js handle `.md` and `.mdx` files in the `pages` directory as pages: