Skip to content

Using Markdown to write documents

source : https://www.markdownguide.org/basic-syntax/

A markdown file is a raw text file that can be edited with any text editor (VScode, Emacs, Notepad...), and viewable with tools like Okular.

Titles

To insert a title, depending on the level:

1
2
3
4
5
6
7
# Level 1 Title, only one per document

##  Level 2 Title

### Level 3 Title

etc.

Emphasis

Bold

1
This is a **bold word**

This is a bold word

Italic

1
This is an *italic word*

This is an italic word

Bold and italic

1
This is a ***bold word***

This is a bold word

Blockquotes

1
> This is a blockquote

This is a blockquote

This is a bold word

1
2
> This is a blockquote
>> This is a nested blockquote

This is a blockquote

This is a nested blockquote

Unordered Lists

Empty lines are required both before and after a list

1
2
3
- First element
- Second element
- Third element
  • First element
  • Second element
  • Third element

Ordered Lists

Empty lines are required both before and after a list

1
2
3
1. First element
2. Second element
3. Third element
  1. First element
  2. Second element
  3. Third element

Nested lists

1
2
3
4
5
6
1. First item
2. Second item
3. Third item
    - Indented item
    - Indented item
4. Fourth item
  1. First item
  2. Second item
  3. Third item
    • Indented item
    • Indented item
  4. Fourth item

Code blocks

To insert a code block, you need to use 3 backticks before and after the code block:

1
2
3
```
my code here
```
To insert code directly into a line of text, you need to surround the code with a backtick on each side: `my command`

Images

To insert an image into a document, for example report.md, place it in the same directory as the report.md file, and write, where you want to insert the image:

1
![Image description](./image.png)
The ./image.png if image.png is in the same directory as your markdown document, otherwise you need to adapt the path.

THe image will not show up in the text editor, but you can have a render of your document, including the image integration with document viewers like Okular on linux.

1
2
3
[Link description](actual link)

[Awesome Git, Gitlab and Markdown training free access website](https://parcours-devops.gitlab-pages.imt-atlantique.fr/)

Awesome Git, Gitlab and Markdown training free access website