
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@jsdevtools/next-mdx
Advanced tools
Adds support for MDX with advanced syntax features in Next.js applications
This library wraps the official Next.js + MDX plugin and configures it with additional Remark and Rehype plugins to enable advanced Markdown syntax and make MDX easier to use for our specific use-cases.
Adds support for YAML frontmatter
createdAt and modifiedAt frontmatter fields. Useful for populating <meta> tags for SEO and social media.layout frontmatter field, which can be used to customize the React layout component to use for each MDX page.Passes a markdown boolean to React components to indicate whether they originally came from Markdown syntax. This allows you to distinguish between **bold** and <b>bold</b> which can be used to apply different styling, or even render completely different JSX.
Rewrites links to MDX files (e.g. /pages/docs/some-page.mdx becomes /pages/docs/some-page)
Detects broken links to MDX files
Install the library via npm:
npm install @jsdevtools/next-mdx
Then use it in your next.config.js file:
const nextMDX = require("@jsdevtools/next-mdx");
const withMDX = nextMDX({
// Next-MDX options go here
siteURL: "http://example.com"
});
module.exports = withMDX({
// Next.js options go here
pageExtensions: ["tsx", "mdx"],
});
See options.ts for all of the options that you can pass to Next-MDX.
NOTE: Don't confuse the Next-MDX options with the Next.js options. Refer to the code example above to see where each goes.
Contributions, enhancements, and bug-fixes are welcome! Open an issue on GitHub and submit a pull request.
To build the project locally on your computer:
Clone this repo
git clone https://github.com/JS-DevTools/next-mdx.git
Install dependencies
npm install
Build the code
npm run build
Run the tests
npm test
Next MDX is 100% free and open-source, under the MIT license. Use it however you want.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
Thanks to these awesome companies for their support of Open Source developers ❤
FAQs
Adds support for MDX with advanced syntax features in Next.js applications
We found that @jsdevtools/next-mdx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.