Markdown Cheatsheet
Tabbed paragraphs
A tabbed paragraph create scrolling code blocks like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris efficitur, velit sit amet tempus commodo, orci ipsum laoreet turpis, eu ullamcorper orci enim ut dui.
A tabbed paragraph in a bulleted or numbered list create indented paragraphs like this:
Lorem
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris efficitur, velit sit amet tempus commodo, orci ipsum laoreet turpis, eu ullamcorper orci enim ut dui.
Page variables
You can add custom variables to the page metadata and use these variables within the page.
Markdown:
---
title: my page
favorite_food: ice cream
---
I love {{< field "favorite_food" >}}!
HTML: I love ice cream!
Links to internal pages
To link to another page in the content directory:
[The prerequisites page]({{< relref "install_maintain/installation/prerequisites.md" >}})
For example: The prerequisites
To link to an anchor on another page in the content directory:
[The prerequisites instructions]({{< relref "install_maintain/installation/prerequisites.md#installing-cloudify-manager" >}})
For example: The prerequisites instructions
Text Formatting
Description | Syntax | Output |
---|---|---|
Emphasized text | *emphasized* | emphasized |
Bold text | **bold** | bold |
Inline code | `print “hello world!”` | print "hello world!" |
Code Blocks
To add code blocks of a specific language, e.g. python, type this:
```python
# this is python code
def hello_world():
print "Hello World!"
```
Output:
# this is python code
def hello_world():
print "Hello World!"
Tables
Syntax:
| heading 1 | heading 2 |
|-----------|-----------|
| cell 1x1 | cell 1x2 |
| cell 2x1 | cell 2x2 |
Output:
heading 1 | heading 2 |
---|---|
cell 1x1 | cell 1x2 |
cell 2x1 | cell 2x2 |
Adding an image
- Copy the image to a directory in: /static/images
- In the markdown page, add the alt text and path to the image like this:
![Alt text]( /images/path/image.png )
For example, ![Building with Cloudify]( /images/cfy_complex.png )
shows:
To make an image appear on the next line in a list:
- Write your instruction.
- Add 2 spaces at the end of the line and put the image on the next line with a tab indentation.
Panels
Info
Info boxes give background information that does not prevent proper use of the product.
Syntax:
{{% info title="FYI" %}}After you do this the first time, it gets easier.{{% /info %}}
Output:
Tip
Tips give additional information for improved use of the product.
Syntax:
{{%tip title="A friendly tip!" %}}Eating on time prevents hunger.{{% /tip %}}
Output:
Note
Notes suggest steps that prevent errors that do not cause data loss.
Syntax:
{{% note title="Here is a note" %}}Make sure you have enough disk space.{{% note %}}
Output:
Warning
Warnings suggest that users think carefully before doing steps that can cause irresversible data loss.
Syntax:
{{% warning title="ACHTUNG" %}}Backup your data before erasing the hard disk!{{% warning %}}
Output: