3

Vultr Flavored Markdown Tutorial

 2 years ago
source link: https://www.vultr.com/docs/vultr-flavored-markdown-tutorial
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
<?xml encoding="utf-8" ??>

Introduction

Use Vultr Flavored Markdown when writing for the Vultr Docs library. The main features of Vultr Flavored Markdown that vary from other common Markdown flavors are:

  • Vultr Markdown does not allow inline HTML. You may only use plain text with Markdown formatting.
  • Links must start with either the http:// or https:// URL scheme. Other URL schemes are stripped.
  • Vultr table formatting differs from most other Markdown variants.
  • Vultr has a special syntax to represent keystrokes.

Please verify your formatting with the preview tab on the submission page. For security, image links do not display in preview.

Our Markdown template is a good starting place for your documentation.


Paragraphs and Line Breaks

A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. Normal paragraphs should not be indented with spaces or tabs.

Paragraph with line breaks

Add two spaces at the end of a line to force a line break.
A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. Normal paragraphs should not be indented with spaces or tabs.


Headers

H1 headings are added automatically at the top of each Vultr doc. Do not include H1 (#) in your article.

## This is an H2

### This is an H3

#### This is an H4

##### This is an H5

###### This is an H6


Blockquotes

Example:

> This is a **blockquote** with two paragraphs. Lorem ipsum dolor sit amet,
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
>
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
> id sem consectetuer libero luctus adipiscing.

Result:

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.

Nested blockquote

Example:

> This is the first level of quoting.
>
>> This is nested blockquote.
>
> Return to the first level blockquote.

Result:

This is the first level of quoting.

This is nested blockquote.

Return to the first level blockquote.


Lists

Unordered list

Example:

* Red
* Green
* Blue

Result:

  • Red
  • Green
  • Blue

Ordered list

Example:

1. Bird  
2. McHale  
3. Parish  

Result:

  1. Bird
  2. McHale
  3. Parish

Ordered list with 2 paragraphs

Example:

1. This is a list item with two paragraphs. Indent the second paragraph 4 spaces to align with the list. 

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.

2. This is the second list item.

Result:

  1. This is a list item with two paragraphs. Indent the second paragraph 4 spaces to align with the list.

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.

  2. This is the second list item.


Code Blocks

Code blocks are indented with 4 spaces at the beginning of each line. Do not use tabs. Do not use backticks or fenced code blocks.

Example:

<- Beginning of line

    int main() {
        std::cout << "Hello World!";
        return 0;
    }

Inline code

Use a single backtick for inline code.

Example:

Use the `printf()` function.

Result:

Use the printf() function.

Literal backticks

Wrap a command with two backticks if you need to show a literal backtick.

Example:

There is a ``literal backtick (`)`` here.

Result:

There is a literal backtick (`) here.

Code blocks in Lists

Code blocks in lists are indented by eight spaces at the beginning of each line. Text indented by four spaces become part of the list item.

Example:

1. This is item one.

    Here is the code for item one.

        int main() {
            std::cout << "Hello World!";
            return 0;
        }

2. This is item two.
3. This is item three.

Result:

  1. This is item one.

    Here is the code for item one:

    int main() {
        std::cout << "Hello World!";
        return 0;
    }
    
  2. This is item two.

  3. This is item three.

Horizontal Rules

Use three hyphens to make a horizontal rule.

Example:

---

Result:


Links

We support inline links, which are preferred for ease of editing and review. Please do not use reference-style links.

Inline links

Example:

This is [an example](http://example.com/ "The Link Title") inline link, titled "The Link Title".
[This link](http://example.net/) has no title attribute.

Result:

This is an example inline link, titled "The Link Title".
This link has no title attribute.

Please do not use reference-style links, like this example:

Some popular search engines are [Google][1], [Yahoo][2], and [MSN][3].  

[1]: http://google.com/ "Google"  
[2]: http://search.yahoo.com/ "Yahoo Search"  
[3]: http://search.msn.com/ "MSN Search"  

Automatic links

Wrap URLs with angle brackets to make an automatic link.

Example:

Make automatic links for URLs and email addresses like this: 
<http://example.com/> and <[email protected]>

Result:

Make automatic links for URLs and email addresses like this: http://example.com/ and [email protected]


Emphasis

Example:

*single asterisks make italic text*
_single underscores make italic text_
**double asterisks make bold text**
__double underscores make bold text__
This also works in the middle**of**words

Result:

single asterisks make italic text
single underscores make italic text
double asterisks make bold text
double underscores make bold text
This also works in the middleofwords

Note: It's common to have variable names in technical documents with underscores. Be careful to escape your underscores!

Correct:

THE\_EXAMPLE\_VARIABLE

THE_EXAMPLE_VARIABLE

Incorrect:

THE_EXAMPLE_VARIABLE

THEEXAMPLEVARIABLE


Special Characters

Use a backslash to escape special characters.

Example:

\*this text is surrounded by literal asterisks\*
\\
\`
\*
\_
\{\}
\[\]
\(\)
\#
\+
\-
\.
\!

Result:

*this text is surrounded by literal asterisks*
\
`
*
_
{}
[]
()
#
+
-
.
!


Automatic Escaping for Special Characters

Copyright HTML entity:

&copy;  

©

Ampersands and angle brackets are converted automatically without delimiters.

AT&T

4 < 5 = 5 > 4


Keyboard

Literal keystrokes are represented with short-codes. You should distinguish uppercase/lowercase with the shift key.

  • X : type a lowercase "x".
  • SHIFT+X : type an uppercase "X".

Example Usage

Save the file by pressing :key_ctrl:+:key_x:, then :key_y:.

Result:
Save the file by pressing CTRL+X, then Y.

Reference

Alphabet

:key_a: :key_b: :key_c: :key_d: :key_e: :key_f: :key_g: :key_h: :key_i: :key_j: :key_k: :key_l: :key_m: :key_n: :key_o: :key_p: :key_q: :key_r: :key_s: :key_t: :key_u: :key_v: :key_w: :key_x: :key_y: :key_z:

Result:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Numbers

:key_1: :key_2: :key_3: :key_4: :key_5: :key_6: :key_7: :key_8: :key_9: :key_0:

Result:
1 2 3 4 5 6 7 8 9 0

Function Keys

:key_f1: :key_f2: :key_f3: :key_f4: :key_f5: :key_f6: :key_f7: :key_f8: :key_f9: :key_f10: :key_f11: :key_f12:

Result:
F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12

Symbols

:key_tilde: :key_grave: :key_exclamation: :key_at: :key_pound: :key_dollar: :key_percent: :key_carat: :key_ampersand: :key_asterisk: :key_lparen: :key_rparen: :key_dash: :key_underscore: :key_plus: :key_equals: :key_lbracket: :key_lbrace: :key_rbracket: :key_rbrace: :key_pipe: :key_backslash: :key_semicolon: :key_colon: :key_quote: :key_apostrophe: :key_lt: :key_comma: :key_gt: :key_period: :key_question: :key_forwardslash: :key_space: :key_spacebar:

Result:
~ ` ! @ # $ % ^ & * ( ) - _ + = [ { ] } | \ ; : " ' < , > . ? / SPACE SPACE

Special Keys

:key_esc: :key_backspace: :key_tab: :key_caps: :key_capslock: :key_enter: :key_return: :key_shift: :key_control: :key_ctrl: :key_super: :key_win: :key_command: :key_alt: :key_meta: :key_printscreen: :key_sysrq: :key_scrolllock: :key_pause: :key_break: :key_delete: :key_end: :key_pagedown: :key_pgdn: :key_insert: :key_home: :key_pageup: :key_pgup: :key_up: :key_left: :key_down:
:key_right: :key_numlock:

Result:
ESC BACKSPACE TAB CAPS CAPS ENTER RETURN SHIFT CTRL CTRL SUPER WIN COMMAND ALT META PRINTSCREEN SYSRQ SCROLLLOCK PAUSE BREAK DELETE END PGDN PGDN INSERT HOME PGUP PGUP UP LEFT DOWN RIGHT NUMLOCK


Tables

Tables use Vultr's unique syntax.

  • The number in line 1 (table) indicates the table width as a percentage of the page width. Max is 100.
  • The numbers in the second column of lines 4, 5, and 6 (th) indicates the column width as a percentage of the table. The total of all columns should be 100.

Vultr Markdown Syntax

Result:

Column 1 Column 2 Column 3

Data 1 Data 2 Data 3

Data 4 Data 5 Data 6

Want to contribute?

You could earn up to $600 by adding new articles


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK