Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@docusaurus/mdx-loader
Advanced tools
@docusaurus/mdx-loader is a webpack loader for MDX (Markdown with JSX) files, specifically designed to work with Docusaurus, a static site generator. It allows you to write content in Markdown and embed React components within that content.
Loading MDX files
This feature allows you to load and process MDX files using webpack. The loader converts MDX content into React components, enabling you to use Markdown and JSX together.
module.exports = {
module: {
rules: [
{
test: /\.mdx?$/,
use: [
{
loader: '@docusaurus/mdx-loader',
options: {
// Options for the loader
},
},
],
},
],
},
};
Customizing MDX processing
This feature allows you to customize the MDX processing by adding remark and rehype plugins. In this example, the loader is configured to use 'remark-math' and 'rehype-katex' plugins for rendering mathematical expressions.
module.exports = {
module: {
rules: [
{
test: /\.mdx?$/,
use: [
{
loader: '@docusaurus/mdx-loader',
options: {
remarkPlugins: [require('remark-math')],
rehypePlugins: [require('rehype-katex')],
},
},
],
},
],
},
};
mdx-loader is a webpack loader for MDX files, similar to @docusaurus/mdx-loader but not specifically tailored for Docusaurus. It allows you to use MDX in any webpack-based project.
gatsby-plugin-mdx is a plugin for Gatsby that enables the use of MDX in Gatsby projects. It provides similar functionality to @docusaurus/mdx-loader but is designed to work within the Gatsby ecosystem.
next-mdx-remote is a library for using MDX with Next.js. It allows you to load MDX content remotely and render it in Next.js pages, providing similar capabilities to @docusaurus/mdx-loader but for the Next.js framework.
@docusaurus/mdx-loader
Docusaurus webpack loader for MDX.
yarn add @docusaurus/mdx-loader
// ...
module: {
rules: [
// ...
{
test: /\.mdx?$/,
use: [
{
loader: '@docusaurus/mdx-loader',
options: {
// .. See options
},
},
],
},
];
}
rehypePlugins
Array of rehype plugins to manipulate the MDXHAST
remarkPlugins
Array of remark plugins to manipulate the MDXAST
metadataPath
A function to provide the metadataPath depending on current loaded MDX path that will be exported as the MDX metadata.
markdownConfig
The global Docusaurus Markdown config (config.markdown
), that plugin authors should forward:
const loader = {
loader: require.resolve('@docusaurus/mdx-loader'),
options: {
markdownConfig: siteConfig.markdown,
},
};
3.7.0 (2025-01-03)
docusaurus-faster
, docusaurus
docusaurus-plugin-content-blog
, docusaurus-theme-classic
create-docusaurus
, docusaurus-mdx-loader
, docusaurus-module-type-aliases
, docusaurus-plugin-client-redirects
, docusaurus-plugin-content-blog
, docusaurus-plugin-content-docs
, docusaurus-plugin-content-pages
, docusaurus-plugin-debug
, docusaurus-plugin-google-analytics
, docusaurus-plugin-google-gtag
, docusaurus-plugin-google-tag-manager
, docusaurus-plugin-ideal-image
, docusaurus-plugin-pwa
, docusaurus-plugin-rsdoctor
, docusaurus-plugin-sitemap
, docusaurus-plugin-svgr
, docusaurus-plugin-vercel-analytics
, docusaurus-preset-classic
, docusaurus-theme-classic
, docusaurus-theme-common
, docusaurus-theme-live-codeblock
, docusaurus-theme-mermaid
, docusaurus-theme-search-algolia
, docusaurus-types
, docusaurus
docusaurus-plugin-content-blog
docusaurus-module-type-aliases
, docusaurus-plugin-svgr
, docusaurus-preset-classic
, docusaurus-types
, docusaurus-utils
, docusaurus
docusaurus-remark-plugin-npm2yarn
docusaurus-theme-classic
, docusaurus-theme-common
docusaurus-bundler
, docusaurus-theme-common
docusaurus-theme-common
docusaurus-theme-translations
docusaurus-plugin-content-docs
docusaurus
docusaurus-mdx-loader
docusaurus-theme-search-algolia
docusaurus
create-docusaurus
, docusaurus-mdx-loader
, docusaurus-module-type-aliases
, docusaurus-plugin-content-blog
, docusaurus-plugin-content-docs
, docusaurus-plugin-content-pages
, docusaurus-plugin-debug
, docusaurus-plugin-ideal-image
, docusaurus-plugin-pwa
, docusaurus-theme-classic
, docusaurus-theme-common
, docusaurus-theme-live-codeblock
, docusaurus-theme-mermaid
, docusaurus-theme-search-algolia
, docusaurus-types
, docusaurus
docusaurus-theme-common
FAQs
Docusaurus Loader for MDX
The npm package @docusaurus/mdx-loader receives a total of 240,139 weekly downloads. As such, @docusaurus/mdx-loader popularity was classified as popular.
We found that @docusaurus/mdx-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.