The way I see it, last saturday lessons can be a beginning of a brand new journey for me. About Thoughtworks, about agility, about next stage of my life, I know there is a lot of things to learn and plan. The first thing I have to learn is recoding and sharing by using the tool of Jianshu. And after a long time thinking, I make up my mind to use my broken english. Hope to keep it up. The first blog is about markdown, which is the basis of the writing.
I will study the following questions,
- What is Markdown?
- Syntax guide and some examples.
What is Markdown?
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).
- a plain text formatting syntax;
- 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.
Syntax guide and some examples
Headers
Markdown supports two styles of headers,Setext and atx.
1.Setext-style headers are "underlined" using equal signs(for first-level headers) and dashes(for second-level headers). for example:
This is an H1
==========
This is an H2
---------------
previews:
This is an H1
This is an H2
Any number of underlining ='s or -'s will work.
2.Atx-style headers use 1-6 hash charachters at the start of the line, corresponding to header levels 1-6, for example:
# This is an H1
###This is an H3
###### This is an H6
preiviews:
This is an H1
This is an H3
This is an H6
Blockquotes
Markdown uses email-style > characters for blockquoting.
> 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.
previews:
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.
Lists
Markdown supports ordered and unordered lists.
1.Unondered lists use asterisks,pluses,and hyphens.
* Red
* Green
* Blue
previews:
- Red
- Green
- Blue
+ Red
+ Green
+ Blue
previews:
- Red
- Green
- Blue
- Red
- black
- Green
- white
- Blue
previews:
- Red
- black
- Green
- white
- Blue
2.Ordered lists uses numbers followed by periods:
1. Bird
2. Dog
3. Parish
previews:
- Bird
- Dog
- Parish
a number-period-space sequence at the beginning of a line. To avoid this, you can backslash-escape the period:
1986\. What a great season.
1986. What a great season.
Horizontal rules
Each of the following lines will produce a horizontal rule:
* * *
***
********
- - -
previews:
Links
Markdown supports two style of links: inline and reference.
1.Inline style example
This is [JianShu](http://www.jianshu.com "Title") inline link.
[This link](http://example.net/) has no title attribute.
previews:
This is JianShu inline link.
This link has no title attribute.
2.reference style example
[JianShu]: http://www.jianshu.com "Optional Title Here"
previews:
[JianShu]: http://www.jianshu.com "Optional Title Here“
Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they’re used, but if you want, you can put them all at the end of your document, sort of like footnotes.
I get 10 times more traffic from [Google] [1] than for [Yahoo] [2] or [MSN] [3].
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
or
I get 10 times more traffic from [Google][] than for [Yahoo][] or [MSN][].
[google]: http://google.com/ "Google"
[yahoo]: http://search.yahoo.com/ "Yahoo Search"
[msn]: http://search.msn.com/ "MSN Search"
previews:
I get 10 times more traffic from Google than for Yahoo or MSN.
Emphasis
*single asterisks*
_single underscores_
**double asterisks**
__doubel underscores__
previews:
single asterisks
single underscores
double asterisks
doubel underscores
Code
To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:
Use the `printf()` function.
previews:
Use the printf()
function.
Images
Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.
![ddd](https://img.haomeiwen.com/i3831424/050a08bf5d626718.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
[id]: url/to/image "Optional title attribute"
t0196791f2a3e97abfd.jpg
Table
About table, the tool of Markdown Tables Generator can handle the whole stuff.
| asdfas | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |
asdfas | Are | Cool | |
---|---|---|---|
col 1 is | left-aligned | $1600 | |
col 2 is | centered | $12 | |
col 3 is | right-aligned | $1 | . |
One last word, welcome to point out the mistake whether the english or the content.
网友评论