Skip to main content

Headings

Use # for the first content heading on a page. Relevate already uses the page title as the document h1, so authored headings start one level below that.

First Section

Second Section

Third Section

# First Section
## Nested Section
### Deeper Section

Text Formatting

Bold text is created with double asterisks.

Italic text is created with single asterisks.

Strikethrough text uses double tildes.

You can combine bold and italic.

**Bold text**
*Italic text*
~~Strikethrough~~
***Bold and italic***

Link to Relevate

Link with title

[Link text](https://example.com)
[Link with title](https://example.com "Title")

Link to other documentation pages:

Go to Callouts

Go to Code Blocks

[Go to Callouts](/components/callouts)

Internal .md and .mdx links are automatically rewritten to work correctly.

Lists

Unordered Lists

  • First item

  • Second item

  • Third item

    • Nested item

    • Another nested item

  • Fourth item

- First item
- Second item
- Nested item

Ordered Lists

  1. First step

  2. Second step

  3. Third step

    1. Sub-step A

    2. Sub-step B

  4. Fourth step

1. First step
2. Second step
1. Sub-step A

Task Lists

  • [x] Completed task

  • [x] Another completed task

  • [ ] Incomplete task

  • [ ] Another incomplete task

- [x] Completed task
- [ ] Incomplete task

Inline Code

Use inline code for small code snippets, function names like handleClick(), or variables like userName.

Use `inline code` for snippets.

Blockquotes

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

Tables

FeatureSupportedNotes
MarkdownYesFull CommonMark support
MDXYesReact components in markdown
Syntax HighlightingYes100+ languages
DiagramsYesMermaid and D2
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |

Table Alignment

Left AlignedCenter AlignedRight Aligned
LeftCenterRight
TextTextText
| Left | Center | Right |
|:-----|:------:|------:|
| Text | Text | Text |

Horizontal Rules

Use horizontal rules to separate sections:

---

Images

![Alt text](/path/to/image.png)

[![Alt text](/image.png)](https://example.com)

Code Blocks

See the Code Blocks page for detailed code examples.

function example() {
console.log("This is a code block");
}

HTML in Markdown

You can use HTML elements:

This is HTML inside markdown.


Click to expand Hidden content here!

<div style="padding: 20px;">
<strong>HTML content</strong>
</div>

Escaping Characters

Use backslashes to escape markdown characters:

*This is not italic*

[This is not a link]

\*Not italic\*
\[Not a link\]

Combining Markdown with Components

You can mix standard markdown with custom components:

This is a regular paragraph with bold text and italic text.

This is a custom component inside the same page.

  • Here's a list item

  • With another item

Component 1

Components work alongside markdown

Component 2

Seamlessly integrated

And back to regular markdown with a link.

Best Practices

Use semantic headings

Structure your content with proper heading hierarchy (H1 β†’ H2 β†’ H3). Don't skip levels.

Add alt text to images

Always include descriptive alt text for accessibility and SEO.

Keep tables simple

Complex tables are hard to read. Consider using lists or breaking into multiple smaller tables.

Use consistent formatting

Stick to one style for emphasis (bold vs italic) and be consistent throughout your docs.

Break up long content

Use headings, horizontal rules, and whitespace to make content scannable.

Complete Example

Here's markdown with multiple elements:

User Guide

Welcome to our comprehensive guide. This guide covers everything you need to know.

Installation

Install the package using your preferred package manager:

npm install example-package

We recommend using the latest LTS version of Node.js.

Configuration

Create a config.json file:

{
"apiKey": "your-api-key",
"endpoint": "https://api.example.com"
}

Usage

  1. Import the package

  2. Initialize with your config

  3. Make your first API call

import Example from 'example-package';
const client = new Example({
apiKey: process.env.API_KEY
});
const result = await client.fetchData();
console.log(result);

Features

FeatureDescriptionStatus
AuthenticationOAuth 2.0 supportβœ… Available
WebhooksReal-time eventsβœ… Available
Rate Limiting1000 req/hourβœ… Available

Need Help?

Last updated: January 2024