Markdown

使用推薦的 TinyMCE 寫個隨筆仍是有點費勁的,我寫東西須要的樣式並不複雜,仍是Markdown吧,更快一點。因此暫停前面的GitHub學習,插一篇Markdown。web

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).markdown

Thus, 「Markdown」 is two things: (1) a plain text formatting syntax; and (2) a software tool, written in Perl, that converts the plain text formatting to HTML.編輯器

The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.ide

Markdown是一種輕量級的標記語言。不要被「語言」嚇倒,前面還有「輕量級」作修飾。簡單說,就是咱們在編輯文字內容的時候加一些符號,以在瀏覽的時候達到部分Html的排版效果,可是比寫Html要簡單要快。例如達到這樣的效果:學習

我是 H1

我是 H2

  • 我是無序列表項1
  • 我是無序列表項2

用Html要這樣寫:idea

<h1>我是 H1</h1>
<h2>我是 H2</h2>
<ul>
  <li>我是無序列表項1</li>
  <li>我是無序列表項2</li>
</ul>

而用Markdown只要這樣寫:.net

# 我是 H1
## 我是 H2
* 我是無序列表項1
* 我是無序列表項2

是否是很簡單呢?快速寫些帶排版的東西仍是挺不錯的。code

官方介紹,英文好的看這裏哦:http://daringfireball.net/projects/markdown/orm

其實Markdown的具體語法我也不用在這羅列,人家做者寫得清楚得很:http://daringfireball.net/projects/markdown/syntax/
若是以爲看得不是很明白,那就結合他這篇語法文檔的源文件一塊兒看:http://daringfireball.net/projects/markdown/syntax.text/文檔

不過看明白了不表明能寫得出,實踐出真知,仍是動手寫寫吧,找個Markdown的編輯器,很快就能上手了。

相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息