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
Numbered lists
In sequential order
[Link text](./relative-page.md)
[External link](https://example.com)

// Syntax highlighting for many languages
function example() {
return "Hello world";
}
Redocly extends standard Markdown with additional capabilities:
Control page behavior with YAML front matter. The page title comes from the first H1 heading. Set seo.title in front matter to override the <title> tag. Set seo.description to add a description for search engines:
---
seo:
title: Custom page title
description: Page description for search engines
---
Learn more about front matter configuration options.
Add titles, line highlighting, and annotations:
function processData() {
const data = fetchData();
if (!data) { // //
throw new Error('No data'); // //
} // //
return data.map(item => ({ // //
id: item.id, // //
name: item.name // //
})); // //
}
Learn more about code snippet configuration. For all highlighting and annotation options see examples at Markdoc code snippet tag, and explore Markdoc code groups for multi-language examples.
Display file and directory structures using the treeview syntax:
.
āāā guides/ # Guides
ā āāā guide-1.md
ā āāā guide-2.md
āāā images/ # Various shared images
ā āāā favicon.png
ā āāā header-image.png
āāā tutorials/ # Tutorials
ā āāā tutorial-1.md
ā āāā tutorial-2.md
ā āāā index.md
ā āāā sidebars.yaml # Sidebar specific to the 'tutorials' section
āāā static/ # Static assets copied directly to build output
ā āāā robots.txt
āāā index.page.tsx # Custom React component for the landing page
āāā package.json # Node.js project manifest
āāā redocly.yaml # Main Redocly configuration file
Result:
.āāāguides/ # Guidesā āāāguide-1.mdā āāāguide-2.mdāāāimages/ # Various shared imagesā āāāfavicon.pngā āāāheader-image.pngāāātutorials/ # Tutorialsā āāātutorial-1.mdā āāātutorial-2.mdā āāāindex.mdā āāāsidebars.yaml # Sidebar specific to the 'tutorials' sectionāāāstatic/ # Static assets copied directly to build outputā āāārobots.txtāāāindex.page.tsx # Custom React component for the landing pageāāāpackage.json # Node.js project manifestāāāredocly.yaml # Main Redocly configuration fileAdd visual diagrams using Mermaid syntax:
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" withLightbox=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 %}
```js {% title="users.js" %}
fetch('/api/users')
.then(response => response.json())
.then(data => console.log(data));
```python {% title="users.py" %}
import requests
response = requests.get('/api/users')
data = response.json()
print(data)
{% /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
- Built-in Markdoc tags - Complete library of interactive components like cards, tabs, admonitions, and code groups for enhanced content
- Partial tag - Share and reuse content across multiple pages to maintain consistency and reduce duplication
- Project structure - Organize your content files and directories for optimal navigation and maintenance
- Manage links - Create internal and external links with automatic validation and cross-references between pages and sections
- Static assets - Host images, files, and other static resources with predictable URLs and optimization
- Markdown configuration - Customize Markdown processing, syntax highlighting, and rendering behavior