Skip to content

How to format posts on Lemmy using Markdown

Lemmy uses markdown-it for rendering markdown. This means that you can use the same markdown syntax that you would use on Lemmy and it follows the CommonMark spec. Here are some examples of markdown that you can use on Lemmy:

Headers

If you enter the following text:

markdown
# Header 1

## Header 2

### Header 3

#### Header 4

##### Header 5

###### Header 6

Lemmy will render it as:

ImageImage

Markdown Headers

Emphasis

If you enter the following text:

markdown
_italic_  
**bold**  
**_bold italic_**  
~~strikethrough~~

Lemmy will render it as:

ImageImage

Markdown Emphasis

Lists

If you enter the following text:

markdown
- Unordered list item 1
- Unordered list item 2
  - Unordered list item 2.1
  - Unordered list item 2.2
- Unordered list item 3

1. Ordered list item 1
2. Ordered list item 2
3. Ordered list item 3

Lemmy will render it as:

ImageImage

Markdown Lists

If you enter the following text:

markdown
[Link text](https://example.com)  
![Image Alt](https://example.com/image.jpg 'Image title')  
![The fedecan Logo](https://fedecan.ca/img/icons/maple-leaf.svg 'Maple Leaf')

Lemmy will render it as:

ImageImage

Markdown Links/Images

Blockquotes

If you enter the following text:

markdown
> Block  
> -quote

Lemmy will render it as:

ImageImage

Markdown Blockquotes

Code

If you enter the following text:

markdown
`inline code`

```python
def hello():
    print("Hello, World!")
```

Lemmy will render it as:

ImageImage

Markdown Inline/Blockcode

Tables

If you enter the following text:

markdown
| Header 1 | Header 2 | Header 3 |
| -------- | -------- | -------- |
| Row 1    | Row 1    | Row 1    |
| Row 2    | Row 2    | Row 2    |
| Row 3    | Row 3    | Row 3    |

Lemmy will render it as:

ImageImage

Markdown Tables

Note

Tables are not officially documented by Lemmy, but they are supported by the frontend.

Horizontal Rule

If you enter the following text:

markdown
Some text.

---

Some more text.

Lemmy will render it as:

ImageImage

Markdown Horizontal Rule

Spoilers

If you enter the following text:

markdown
::: spoiler Spoiler Name
Spoiler Content
:::

Lemmy will render it as:

ImageImage

Markdown Spoilers (closed)

The user can then toggle the spoiler to show the content:

ImageImage

Markdown Spoilers (open)

This is not supported by all apps

Some apps may not support this spoiler notation. In that case, the spoiler will be rendered as a regular blockquote.

Sub/Superscript

If you enter the following text:

markdown
H~2~O

H^2^O

Lemmy will render it as:

ImageImage

Markdown Spoilers (open)