MDX and Markdown Reference
This page is the authoritative reference for writing documentation in TechDOCS.
Choose the right file type
- Use
.mdfor static content. - Use
.mdxwhen you need React components in the page.
Frontmatter
Add metadata at the top of each document:
---
title: Page Title
description: Short description
sidebar_position: 1
---
Core Markdown syntax
Headings and text
# H1
## H2
### H3
**bold** *italic* `inline code`
Lists and links
- unordered item
1. ordered item
[Internal link](/docs/intro)
[External link](https://docusaurus.io)
Code blocks
```bash title="Install dependencies"
npm install
```
Admonitions
Use admonitions for important guidance:
:::tip
Use this for practical recommendations.
:::
:::warning
Use this for risky operations.
:::
MDX components
Import components at the top of .mdx files:
import InteractiveCodeEditor from '@site/src/components/InteractiveCodeEditor';
Use the component in content:
<InteractiveCodeEditor
title="JavaScript Playground"
initialCode={`console.log('Hello')`}
/>
Tables
| Field | Type | Required |
|-------|------|----------|
| name | text | Yes |
| id | uuid | Yes |
Math (KaTeX)
Inline math: $E = mc^2$
Block math:
$$
\int_0^1 x^2 dx = \frac{1}{3}
$$
Authoring standards
- Keep headings task-oriented.
- Keep paragraphs short and direct.
- Use copy-paste-safe commands.
- Validate all links before publishing.
- Prefer examples from real workflows, not placeholders.