md是Markdown的縮寫,md是一種易讀易寫的文本格式(easy-to-read, easy-to-write plain text format),並且可以很方便的轉換成HTML格式顯示在網頁中。 以后項目的readme就可以用md格式編寫了,下面列出了md格式的基本語法。
標題 Headings:
# 標題 1 (對應HTML中的標簽)
## 標題 2 (對應HTML中的標簽)
......
###### 標題 6 (對應HTML中的標簽)
注意:標題與#之間要留一個空格
段落 Paragraph :
兩段文字之間至少要留有一個空行(one or more blank lines)
字體 Styling Text:
斜體: *This text will be italic* (對應HTML中的標簽)
粗體:**This text will be bold** (對應HTML中的標簽)
列表 Lists:
無序號的列表 Unordered Lists
* item
* item
或者
- item
- item
注意: *和-要與列表內容之間要有空格, *是實心的圓點,-是空心的圓點
有序號的列表 Ordered List:s
1. item
2. item
注意: 列表序號與列表內容之間要有空格
嵌套的列表 Nested Lists:
1. item
1.1 item
1.2 item
注意: 嵌套列表要縮進2個空格 indenting list items by two spaces
引用 Blockquotes:
引用文字前填加 > (indicate blockquotes with a >)
> 引用文本
代碼快 Code Block
To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab.
在每行代碼前,使用4個空格或者tab縮進。
例如:
# Title
if x > y:
print x
鏈接 Links:
把鏈接文字放在中括號[]中,把對應的URL放到小括號()中。(wrapping link text in brackets [ ], and then wrapping the link in parenthesis ( ) ).
[Sina Blog](blog.sina.com.cn)
參考URL:
1. https://help.github.com/articles/markdown-basics
2. http://zhangchi.de/post/intro-to-markdown.html
