The original readme.md file on GitHub is so interesting--markdown language explanation

Source: Internet
Author: User

Reprint Please specify source: http://blog.csdn.net/zhaokaiqiang1992

I've been using GitHub before, and I've shared a lot of projects and demos on it, and each time I created a new project, I used the default readme.md file and didn't know anything about the file. But in seeing someone else write the project readme.md inside unexpectedly have picture, link what, feel very curious, this effect is what add to? So he checked the information, the result, had moved out a language that has never been understood--markdown!

The readme.md file on GitHub is written in the markdown language, and we'll start with a brief introduction to the context of the language and then introduce some basic syntax and usage.

1. Contextual and grammatical features

Markdown is a lightweight markup language, the founder of John Grouber (John Gruber). It allows people to "write documents in plain text format that is easy to read and write, and then convert them into valid XHTML (or HTML) documents." This language absorbs a lot of the plain text tags that are already in e-mail.

Markdown's goal is to achieve "easy-to-read and easy-to-write". Readability, in any case, is the most important. A file written in Markdown format should be published directly in plain text and will not appear to be composed of many labels or formatting instructions. The Markdown syntax is influenced by a number of existing text-to-html formats, including Setext, ATX, Textile, Restructuredtext, Grutatext, and Ettext, and the greatest source of inspiration is the format of plain text e-mail. In short, Markdown's grammar is made up of a number of symbols, which are carefully selected for a glance. For example, by adding an asterisk to both sides of the text, it looks like a * accent *. The list of Markdown looks, well, is the list. Markdown's chunk references seem to really look like a reference to a piece of text, as you've seen in an email.


The goal of the Markdown syntax is to become a writing language for the web. Markdown does not want to replace HTML, or even close to it, it has very few grammatical types, only a small part of the HTML tag. Markdown's idea is not to make HTML documents easier to write. In my opinion, HTML is easy to write. Markdown's philosophy is that it makes it easier to read, write, and change documents. HTML is a published format, and Markdown is a form of writing. In this way, Markdown's format syntax covers only the range that plain text can cover.

It is because of these features of markdown that they are more powerful than plain text, so many people use it to write blogs. The world's most popular blog platform WordPress and large cms such as Joomla, Drupal can be very good support markdown.

2. Editing software if we want to write markdown code, we need an editor first, because I use a Mac, so it is recommended to use the MOU, very powerful, very useful. below is the MoU interface, the left is the markdown code, the right is real-time display effect, and can choose different theme color, very beautiful!  
 of Course, if you use a different platform, you can choose the online editor, the effect is also very good. Two online markdown editors are givenhttp://mahua.jser.me/http://maxiang.info/The first one is personal development, free to use, very praise! The second one is an already released product that can be edited online for free. In addition, the content can be synced to Evernote, but only 10 days to try, after 79/year, or very good.  3. Common Syntax Introduction only the most commonly used and most common features are described here, so if you want to see all the syntax, please go to http://wowubuntu.com/markdown/index.html (1) TitleThe title uses a different number of "#" to identify what level it can correspond to in the HTML H1-h6, the following is the sample code and effect 
 "========" style can also, but I do not like, not catch the "#" of the use of (2) Imagewe can use the following syntax to add a picture    ! [Alt text] (/path/to/img.jpg)
detailed descriptions are as follows:
An exclamation!
followed by a square bracket, where the alternative text of the slice
followed by an ordinary bracket, where the URL of the piece Here is an example
  (3) Emphasizewe can use the following way to add emphasis to our text effect * Emphasis * or _ emphasis _ (Example: Italic)
* * Heavier Emphasis * * or __ Add emphasis __ (example: bold)
Special emphasis on * * * or ___ Special emphasis ___ (example: Bold italic)
 Here is an example: 
   (4) Code if we want to add code to the article, we have two waysThe first way is to wrap the code with an inverse quotation mark (the button below the ESC key) .Here is a sample code The second way is to indent rows with tabs or at least 4 spacesHere is a sample code 
  (5) line breakif we want to wrap a line of text, we can enter at least two spaces in the place where we need to break the line, and then return to the car, note that if you do not enter, there is no effect, like this
  (6) Referencesif we cite the material in the article, then we can use a right angle bracket ">" to indicate that this is a reference content. We can add one at the beginning or one in front of each line. We can also nest other references inside the reference, here's an example: 
  (7) LinksIf we include a link in our article, we add it in the following way[link text] (link address)
Example: [Markdown] (http://blog.csdn.net/zhaokaiqiang1992)
 
  (8) Split lineif we want to split the content with a split line, we can enter 3 or more dashes, asterisks, or underscores in a single line. You can enter any space between the dash and the asterisk. Each of the following lines produces a horizontal split line.  
  (9) List Markif our content needs to be tagged, then we can use the following method
 

The original readme.md file on GitHub is so interesting--markdown language explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.