Markdown Features
Docusaurus supports the Markdown syntax and has some additional features.
Front Matterโ
Markdown documents can have associated metadata at the top called Front Matter:
---
id: my-doc
title: My document title
description: My document description
sidebar_label: My doc
---
Markdown content
Markdown linksโ
Regular Markdown links are supported using url paths or relative file paths.
Let's see how to [Create a page](/create-a-page).
Let's see how to [Create a page](./create-a-page.md).
Let's see how to Create a page.
Markdown imagesโ
Regular Markdown images are supported.
Add an image at static/img/docusaurus.png
and use this Markdown declaration:

Code Blocksโ
Markdown code blocks are supported with Syntax highlighting.
function HelloDocusaurus() {
return (
<h1>Hello, Docusaurus!</h1>
)
}
function HelloDocusaurus() {
return <h1>Hello, Docusaurus!</h1>;
}
Admonitionsโ
Docusaurus has a special syntax to create admonitions and callouts:
Use this awesome feature option
This action is dangerous
Use this awesome feature option
This action is dangerous
React componentsโ
Thanks to MDX, you can make your doc more interactive and use React components inside Markdown:
export const Highlight = ({children, color}) => (
<span
style={{
backgroundColor: color,
borderRadius: '2px',
color: 'red',
padding: '0.2rem',
}}>
{children}
</span>
);
<Highlight color="#25c2a0">Docusaurus green</Highlight> and <Highlight color="#1877F2">Facebook blue</Highlight> are my favorite colors.
Docusaurus green and Facebook blue are my favorite colors.
- Apple
- Orange
- Banana
This is an apple ๐
This is an orange ๐
This is a banana ๐