Zum Inhalt

Markdown

Overview

Markdown Logo

from John Gruber

Markdown is a text-to-HTML conversion tool for web writers.
Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

So Markdown is both Syntax and a conversion software.

Basics

Start section / sub-section of your document with a header

# This is the largest header 
## This is a smaller header 
###### This is a very small header

Paragraph

To create line breaks, add two space characters at the end of a line.
To create paragraphs, use a blank line to separate one or more lines of text.

Paragraphs

Q: What is the chemical formula for "coffee"?
A: CoFe2

Q: What is the chemical formula for "banana"?
A: BaNa2

Q: What is the chemical formula for "coffee"?  
A: CoFe2

Q: What is the chemical formula for "banana"?  
A: BaNa2

Emphasize text

You can add emphasis by making text bold, italic, strikethrough or combine them alltogether.

Text emphasis

This is bold text
This is italic text
This is bold italic text
this is strikethrough
This is strikethrough bold italic text

**This is bold text**  
*This is italic text*  
***This is bold italic text***  
~~this is strikethrough~~  
~~***This is strikethrough bold italic text***~~  

Hyperlinks are written as link text in square brackets followed by the link target in round brackets [TEXT](TARGET)

Hyperlinks

[Helmholtz-Zentrum Berlin](https://www.helmholtz-berlin.de/)  
[Zuse Institute Berlin](https://zib.de)

Code

Code can be written inline (surrounded by single backticks ` ) or as code blocks with three backticks ` in a opening anc closing line.

Code

Prettify json with jq (cat /tmp/output.json | jq '.')

{
    "colors":
    [
        "green"
        "yellow"
        "red"
    ]
    "fruit":
    [
        "apple"
        "banana"
        "cherry"
    ]
}
Prettify **json** with **jq** (`cat /tmp/output.json | jq '.'`)

 ```json
 {
     "colors":
     [
         "green"
         "yellow"
         "red"
     ]
     "fruit":
     [
         "apple"
         "banana"
         "cherry"
     ]
 }
 ```

Images

Images

ZIB Logos

Image title
ZIB Logos

![ZIB Logos](https://www.helmholtz-berlin.de/media/media/oea/vorlagen/cd/logos/hzb/hzb-logo-a4-rgb.jpg){ align=left width="300" }

<figure markdown="span">
  ![Image title](https://www.zib.de/sites/default/files/pressmaterial_previews/Logovorschau_0.png){ align=left width="300" }
  <figcaption>ZIB Logos</figcaption>
</figure>

Extensions

Material for MkDocs adds extended features like annotations, tables, diagrams, math and more to expand basic markdown functionality.

Tables

Tables

Method Description
GET Fetch resource
PUT Update resource
DELETE Delete resource
| Method   | Description                          |
| -------- | ------------------------------------ |
| `GET`    | :material-check:     Fetch resource  |
| `PUT`    | :material-check-all: Update resource |
| `DELETE` | :material-close:     Delete resource |

Diagrams

Diagrams

flowchart LR
    A[Create Issue] --> B[Create MR];
    B[Create MR] --> C[Pull/Checkout Branch];
    C[Pull/Checkout Branch] --> D[Commit/Push];
    D[Commit/Push] --> E[Merge]; 
 ```mermaid
 flowchart LR
     A[Create Issue] --> B[Create MR];
     B[Create MR] --> C[Pull/Checkout Branch];
     C[Pull/Checkout Branch] --> D[Commit/Push];
     D[Commit/Push] --> E[Merge]; 
 ```

some markdown and mkdos links