Markdown Features
Docusaurus uses Markdown as the primary format for writing documentation,
but it extends it with MDX, enabling React components inside Markdown files.
Need a refresher? Learn Markdown in 10 minutes to get started quickly.
MDX Powerโ
MDX transforms Markdown into React components, allowing you to mix text, JSX, and interactive UI elements in a single file.
This is what makes Docusaurus docs highly customizable and interactive.
Example:
# Hello World
Welcome to my page!
<MyComponent />
This renders both the Markdown heading and the <MyComponent />
React component.
Use the MDX Playground to see how your Markdown+JSX compiles to React.
MDX vs CommonMarkโ
Docusaurus supports two Markdown parsing modes:
- MDX format โ Allows JSX and components.
- CommonMark format โ Standard Markdown with no JSX.
By default, .md
and .mdx
files both use MDX.
You can opt in to CommonMark with the markdown.format
config or mdx.format: md
front matter.
export default {
markdown: {
format: 'detect', // auto: .md โ CommonMark, .mdx โ MDX
},
};
CommonMark support is still experimental and may differ from other renderers.
Standard Markdown Featuresโ
All familiar Markdown syntax works:
### My Section
Some **bold** text, some _italic_, and a [link](/).
My Section
Some bold text, some italic, and a link.Front Matterโ
Front matter lets you add metadata to your Markdown files. Itโs written in YAML between triple dashes at the top of a file.
---
title: Getting Started
description: Quick introduction to my guide
tags: [intro, tutorial]
---
Different plugins support different front matter fields:
You can even customize the parser:
export default {
markdown: {
parseFrontMatter: async (params) => {
const result = await params.defaultParseFrontMatter(params);
if (result.frontMatter.shortTitle) {
result.frontMatter.title = result.frontMatter.shortTitle;
}
return result;
},
},
};
Quotes and Calloutsโ
Docusaurus makes open source documentation easy.
โ The Team
Quotes render with elegant styling.
Details & Collapsible Sectionsโ
Docusaurus supports <details>
for collapsible content:
<details>
<summary>Click to expand</summary>
Hidden content **with Markdown** inside!
</details>
Click to expand
Hidden content with Markdown inside!
Assets & Imagesโ
Use relative paths to reference images and files:

Docusaurus will automatically optimize and resolve the asset URLs.
With Markdown + MDX, you can start with simple text and gradually enhance pages with dynamic React components, interactive demos, and custom UI elementsโall in one file.