markdown format for blogging
Markdown format
Blockquotes
Email-style “>” is used for blockquoting, example:
Quoted content More contents follows with another leading >
Lazy blocks New lines can ommit the leading “>” while Markdown is smart enough to be aware of this.
Nested quotes
Nested contents
This is the outer quoted text.
Block quotes can contain other mark down syntax
This is a header
- First column
- Second column
Here is some example code:
return shell_exec("echo $input| $markdown_script")
Lists (ordered and unordered)
Both bullet lists and numbered lists are supported.
Colors:
- Red
- Green
- Blue
The same as
- Red
- Green
- Blue
or
- Red
- Green
- Blue
Numbered list
- Bird
- McHale
- Parish
Lists can be intended:
- Number 1
- Number 2
- Number 3
Lists may contain multiple paragraphs
-
The first paragraph in this list Contents continue
Another paragraph
-
Second one, par1
Par2.
Qutoes inside the list sub-paragraph
Special blocks
code blocks
Code blocks can be formatted with a new line and an extra 8 spaces or 2 TABs. Exmple:
#Some shell scripts
cat log.txt | awk -F":" '{print $2}' | sort -n | wc -l
Span of code like the following function call as sprintf()
This is a line of code contains literal backtick There is a literal backtick (`) here
Special link example
-
local link This is an example to refer to a local page, see studyMaterials.
-
implicit link Links to Google
Links to official guide, visit Daring Fireball for more information.
-
link shortcuts
Emphasis
- Single asterisks example
- Single underscore example
- Double asterisks double asterisks
- Double underscore double underscore
- Emphasis in the middle of a word - T__his__ is an ex_am_ple
- Literal asterisk *literal asterisk*
Images/others
Image syntax has 2 styles:
-
Inline syntax, like
![Alt text](/path/to/img.jpg) ![Alt text](/path/to/img.jpg "Optional title")
This is an image for my workspace
-
Preference style, using
![Alt text][id]
Here id is the name of a defined image index, the same example:
Leave a Comment
Your email address will not be published. Required fields are marked *