CmdocsCmdocs
Content

MDX Basics

Learn how to write documentation using MDX — Markdown with JSX components.

MDX Basics

cmdocs uses MDX — a format that lets you use JSX components inside Markdown documents.

Markdown Features

All standard Markdown features are supported:

Headings

# Heading 1
## Heading 2
### Heading 3

Headings automatically generate anchor links and appear in the table of contents.

Text Formatting

**Bold text**
*Italic text*
~~Strikethrough~~
`inline code`
[External link](https://example.com)
[Internal link](/documentation/quickstart)

Lists

- Unordered item
- Another item
  - Nested item

1. Ordered item
2. Another item

Blockquotes

> This is a blockquote.
> It can span multiple lines.

Code Blocks

Use triple backticks with a language identifier for syntax highlighting:

```typescript
function greet(name: string): string {
  return `Hello, ${name}!`;
}
```

Supported languages include: typescript, javascript, python, rust, go, bash, json, yaml, css, html, and many more.

Tables

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |

Images

![Alt text](/images/screenshot.png)

Place images in the public/ directory and reference them with an absolute path.

JSX Components

The power of MDX is using React components directly in your content. cmdocs auto-imports all built-in components — just use them:

<Callout type="info">
  This is an informational callout.
</Callout>

See the Components page for all available components.

Frontmatter

Every MDX file starts with a YAML frontmatter block:

---
title: Page Title
description: A brief description of this page.
---

# Your content here

See Frontmatter Reference for all supported fields.

How is this guide?

On this page