Unverified Commit e0ff0504 authored by я котик пур-пур's avatar я котик пур-пур Committed by GitHub

Update the "Top level .mdx pages" code sample (#27080)

The regex matches both .md and .mdx extensions, so I've added the .md extension to the description and `pageExtensions` array.

## Documentation / Examples

- [x] Make sure the linting passes
parent 80884160
...@@ -61,7 +61,7 @@ module.exports = withMDX() ...@@ -61,7 +61,7 @@ module.exports = withMDX()
## Top level .mdx pages ## Top level .mdx pages
Define the `pageExtensions` option to have Next.js handle `.mdx` files in the `pages` directory as pages: Define the `pageExtensions` option to have Next.js handle `.md` and `.mdx` files in the `pages` directory as pages:
```js ```js
// next.config.js // next.config.js
...@@ -69,7 +69,7 @@ const withMDX = require('@next/mdx')({ ...@@ -69,7 +69,7 @@ const withMDX = require('@next/mdx')({
extension: /\.mdx?$/, extension: /\.mdx?$/,
}) })
module.exports = withMDX({ module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'mdx'], pageExtensions: ['js', 'jsx', 'md', 'mdx'],
}) })
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment