Redocly projects support enhanced Markdown that combines standard Markdown syntax with powerful Markdoc extensions, giving you rich formatting options and interactive components for your documentation.
All standard Markdown syntax works in Redocly projects:
**Bold text** and *italic text*
~~Strikethrough text~~
`Inline code`
> Blockquotes for callouts and emphasis
# Page title (H1)
## Section heading (H2)
### Subsection heading (H3)
- Bulleted lists
- With multiple items
1. Numbered lists
2. In sequential order
[Link text](./relative-page.md)
[External link](https://example.com)

```javascript
// Syntax highlighting for many languages
function example() {
return "Hello world";
}
```
Redocly extends standard Markdown with additional capabilities:
Control page behavior with YAML front matter:
---
title: Custom page title
description: Page description for SEO
---
Add titles, line highlighting, and annotations:
```javascript {% title="app.js" highlight="{2,4-6}" %}
function processData() {
const data = fetchData();
if (!data) { // // [!code error]
throw new Error('No data'); // // [!code error]
} // // [!code error]
return data.map(item => ({ // // [!code ++]
id: item.id, // // [!code ++]
name: item.name // // [!code ++]
})); // // [!code ++]
}
```
Learn more about code snippet configuration for all highlighting and annotation options, and explore Markdoc code tags for multi-language examples.
Display project structure with the treeview
format:
```treeview
project/
├── docs/
│ ├── api/
│ │ └── openapi.yaml
│ └── guides/
│ └── getting-started.md
├── images/
└── redocly.yaml
```
Add visual diagrams using Mermaid syntax:
```mermaid
graph TD
A[User Request] --> B{Authentication}
B -->|Valid| C[Process Request]
B -->|Invalid| D[Return Error]
C --> E[Return Response]
```
Learn more about adding diagrams with additional examples and chart types.
Redocly includes powerful Markdoc tags for interactive elements:
{% tabs %}
{% tab label="Option A" %}
Content for the first tab.
{% /tab %}
{% tab label="Option B" %}
Content for the second tab.
{% /tab %}
{% /tabs %}
Learn more about the tabs tag for organizing content.
{% admonition type="info" name="Important note" %}
This is an informational callout with custom styling.
{% /admonition %}
{% cards %}
{% card title="Feature 1" icon="star" to="./feature-1.md" %}
Description of the first feature.
{% /card %}
{% card title="Feature 2" icon="gear" to="./feature-2.md" %}
Description of the second feature.
{% /card %}
{% /cards %}
Learn more about admonitions and cards for enhanced visual presentation.
Enhanced image display with sizing, lightbox, and captions:
{% img src="./images/screenshot.png" alt="Application screenshot" width="400" lightbox=true %}
A screenshot showing the main application interface.
{% /img %}
Add inline icons for visual enhancement:
{% icon name="star" /%} Highlighted feature
{% icon name="warning" color="orange" /%} Important note
Learn more about image handling and icons for visual elements.
{% code-snippet file="./examples/sample.js" title="Sample code" /%}
{% markdoc-example %}
This shows how Markdoc syntax renders in practice.
{% /markdoc-example %}
{% code-group %}
{% code title="JavaScript" lang="javascript" %}
fetch('/api/users')
.then(response => response.json())
.then(data => console.log(data));
{% /code %}
{% code title="Python" lang="python" %}
import requests
response = requests.get('/api/users')
data = response.json()
print(data)
{% /code %}
{% /code-group %}
Learn more about code snippets, code groups, and Markdoc examples for displaying code.
{% partial file="/_partials/shared-section.md" /%}
Learn more about partials for reusing content across pages.
{% openapi-code-sample
path="/users"
method="post"
lang="javascript" /%}
{% json-schema schema="user-schema.json" /%}
Learn more about OpenAPI code samples and JSON schema for API documentation.
Redocly uses enhanced table formatting:
{% table %}
- Column 1
- Column 2
- Column 3
---
- Row 1, Cell 1
- Row 1, Cell 2
- Row 1, Cell 3
---
- Row 2, Cell 1
- Row 2, Cell 2
- Row 2, Cell 3
{% /table %}
Learn more about table formatting for structured data presentation.
- Use descriptive filenames with kebab-case:
user-authentication.md
- Organize related content in folders
- Place reusable content in
_partials/
folders
- Start with a clear H1 heading
- Use descriptive link text instead of "click here"
- Include alt text for images
- Break up long content with headings and lists
- Use relative links for internal pages:
./other-page.md
- Link to specific sections with anchors:
./page.md#section-name
- Test links to ensure they work correctly
- Store images in organized folders like
./images/
- Use descriptive filenames for images
- Optimize image sizes for web display
- Consider using static assets for predictable URLs
- Markdoc tags reference - Complete library of interactive components like cards, tabs, admonitions, and code groups for enhanced content
- Content reuse with partials - Share and reuse content across multiple pages to maintain consistency and reduce duplication
- Project structure guide - Organize your content files and directories for optimal navigation and maintenance
- Links and navigation - Create internal and external links with automatic validation and cross-references between pages and sections
- Static assets management - Host images, files, and other static resources with predictable URLs and optimization
- Markdown configuration - Customize Markdown processing, syntax highlighting, and rendering behavior