mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
unfuck markdown doc
This commit is contained in:
parent
1b95655b3c
commit
8ad537a9ba
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
language: markdown
|
language: markdown
|
||||||
|
lang: cs-cz
|
||||||
contributors:
|
contributors:
|
||||||
- ["Dan Turkel", "http://danturkel.com/"]
|
- ["Dan Turkel", "http://danturkel.com/"]
|
||||||
translators:
|
translators:
|
||||||
|
@ -26,6 +26,7 @@ specific to a certain parser.
|
|||||||
|
|
||||||
## HTML Elements
|
## HTML Elements
|
||||||
Markdown is a superset of HTML, so any HTML file is valid Markdown.
|
Markdown is a superset of HTML, so any HTML file is valid Markdown.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
<!--This means we can use HTML elements in Markdown, such as the comment element,
|
<!--This means we can use HTML elements in Markdown, such as the comment element,
|
||||||
and they won't be affected by a markdown parser. However, if you create an HTML element
|
and they won't be affected by a markdown parser. However, if you create an HTML element
|
||||||
@ -54,6 +55,7 @@ This is an h1
|
|||||||
This is an h2
|
This is an h2
|
||||||
-------------
|
-------------
|
||||||
```
|
```
|
||||||
|
|
||||||
## Simple text styles
|
## Simple text styles
|
||||||
|
|
||||||
Text can be easily styled as italic or bold using markdown.
|
Text can be easily styled as italic or bold using markdown.
|
||||||
@ -133,6 +135,7 @@ or
|
|||||||
- Item
|
- Item
|
||||||
- One last item
|
- One last item
|
||||||
```
|
```
|
||||||
|
|
||||||
Ordered lists are done with a number followed by a period.
|
Ordered lists are done with a number followed by a period.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
@ -152,6 +155,7 @@ render the numbers in order, but this may not be a good idea.
|
|||||||
(This renders the same as the above example)
|
(This renders the same as the above example)
|
||||||
|
|
||||||
You can also use sublists
|
You can also use sublists
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
1. Item one
|
1. Item one
|
||||||
2. Item two
|
2. Item two
|
||||||
@ -197,13 +201,13 @@ John didn't even know what the `go_to()` function did!
|
|||||||
```
|
```
|
||||||
|
|
||||||
In Github Flavored Markdown, you can use a special syntax for code
|
In Github Flavored Markdown, you can use a special syntax for code
|
||||||
```markdown
|
|
||||||
\`\`\`ruby <!-- except remove those backslashes when you do this, just ```ruby ! -->
|
<pre>
|
||||||
|
<code class="highlight">```ruby
|
||||||
def foobar
|
def foobar
|
||||||
puts "Hello world!"
|
puts "Hello world!"
|
||||||
end
|
end
|
||||||
\`\`\` <!-- here too, no backslashes, just ``` -->
|
```</code></pre>
|
||||||
```
|
|
||||||
|
|
||||||
The above text doesn't require indenting, plus Github will use syntax
|
The above text doesn't require indenting, plus Github will use syntax
|
||||||
highlighting of the language you specify after the \`\`\`
|
highlighting of the language you specify after the \`\`\`
|
||||||
@ -212,6 +216,7 @@ highlighting of the language you specify after the \`\`\`
|
|||||||
|
|
||||||
Horizontal rules (`<hr/>`) are easily added with three or more asterisks or hyphens,
|
Horizontal rules (`<hr/>`) are easily added with three or more asterisks or hyphens,
|
||||||
with or without spaces.
|
with or without spaces.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
***
|
***
|
||||||
---
|
---
|
||||||
@ -228,58 +233,64 @@ the text to display in hard brackets [] followed by the url in parentheses ()
|
|||||||
[Click me!](http://test.com/)
|
[Click me!](http://test.com/)
|
||||||
```
|
```
|
||||||
You can also add a link title using quotes inside the parentheses.
|
You can also add a link title using quotes inside the parentheses.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
[Click me!](http://test.com/ "Link to Test.com")
|
[Click me!](http://test.com/ "Link to Test.com")
|
||||||
```
|
```
|
||||||
Relative paths work too.
|
Relative paths work too.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
[Go to music](/music/).
|
[Go to music](/music/).
|
||||||
```
|
```
|
||||||
Markdown also supports reference style links.
|
|
||||||
```markdown
|
|
||||||
[Click this link][link1] for more info about it!
|
|
||||||
[Also check out this link][foobar] if you want to.
|
|
||||||
|
|
||||||
[link1]: http://test.com/ "Cool!"
|
Markdown also supports reference style links.
|
||||||
[foobar]: http://foobar.biz/ "Alright!"
|
|
||||||
```
|
<pre><code class="highlight">[<span class="nv">Click this link</span>][<span class="ss">link1</span>] for more info about it!
|
||||||
|
[<span class="nv">Also check out this link</span>][<span class="ss">foobar</span>] if you want to.
|
||||||
|
|
||||||
|
[<span class="nv">link1</span>]: <span class="sx">http://test.com/</span> <span class="nn">"Cool!"</span>
|
||||||
|
[<span class="nv">foobar</span>]: <span class="sx">http://foobar.biz/</span> <span class="nn">"Alright!"</span></code></pre>
|
||||||
|
|
||||||
The title can also be in single quotes or in parentheses, or omitted
|
The title can also be in single quotes or in parentheses, or omitted
|
||||||
entirely. The references can be anywhere in your document and the reference IDs
|
entirely. The references can be anywhere in your document and the reference IDs
|
||||||
can be anything so long as they are unique.
|
can be anything so long as they are unique.
|
||||||
|
|
||||||
There is also "implicit naming" which lets you use the link text as the id.
|
There is also "implicit naming" which lets you use the link text as the id.
|
||||||
```markdown
|
|
||||||
[This][] is a link.
|
|
||||||
|
|
||||||
[this]: http://thisisalink.com/
|
<pre><code class="highlight">[<span class="nv">This</span>][] is a link.
|
||||||
```
|
|
||||||
|
[<span class="nv">this</span>]: <span class="sx">http://thisisalink.com/</span></code></pre>
|
||||||
|
|
||||||
But it's not that commonly used.
|
But it's not that commonly used.
|
||||||
|
|
||||||
## Images
|
## Images
|
||||||
Images are done the same way as links but with an exclamation point in front!
|
Images are done the same way as links but with an exclamation point in front!
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
![This is the alt-attribute for my image](http://imgur.com/myimage.jpg "An optional title")
|
![This is the alt-attribute for my image](http://imgur.com/myimage.jpg "An optional title")
|
||||||
```
|
```
|
||||||
|
|
||||||
And reference style works as expected.
|
And reference style works as expected.
|
||||||
```markdown
|
|
||||||
![This is the alt-attribute.][myimage]
|
|
||||||
|
|
||||||
[myimage]: relative/urls/cool/image.jpg "if you need a title, it's here"
|
<pre><code class="highlight">![<span class="nv">This is the alt-attribute.</span>][<span class="ss">myimage</span>]
|
||||||
```
|
|
||||||
|
|
||||||
|
[<span class="nv">myimage</span>]: <span class="sx">relative/urls/cool/image.jpg</span> <span class="nn">"if you need a title, it's here"</span></code></pre>
|
||||||
## Miscellany
|
## Miscellany
|
||||||
### Auto-links
|
### Auto-links
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
<http://testwebsite.com/> is equivalent to
|
<http://testwebsite.com/> is equivalent to
|
||||||
[http://testwebsite.com/](http://testwebsite.com/)
|
[http://testwebsite.com/](http://testwebsite.com/)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Auto-links for emails
|
### Auto-links for emails
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
<foo@bar.com>
|
<foo@bar.com>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Escaping characters
|
### Escaping characters
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
I want to type *this text surrounded by asterisks* but I don't want it to be
|
I want to type *this text surrounded by asterisks* but I don't want it to be
|
||||||
in italics, so I do this: \*this text surrounded by asterisks\*.
|
in italics, so I do this: \*this text surrounded by asterisks\*.
|
||||||
@ -288,6 +299,7 @@ in italics, so I do this: \*this text surrounded by asterisks\*.
|
|||||||
### Keyboard keys
|
### Keyboard keys
|
||||||
|
|
||||||
In Github Flavored Markdown, you can use a `<kbd>` tag to represent keyboard keys.
|
In Github Flavored Markdown, you can use a `<kbd>` tag to represent keyboard keys.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Your computer crashed? Try sending a
|
Your computer crashed? Try sending a
|
||||||
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd>
|
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd>
|
||||||
@ -296,6 +308,7 @@ Your computer crashed? Try sending a
|
|||||||
|
|
||||||
Tables are only available in Github Flavored Markdown and are slightly
|
Tables are only available in Github Flavored Markdown and are slightly
|
||||||
cumbersome, but if you really want it:
|
cumbersome, but if you really want it:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
| Col1 | Col2 | Col3 |
|
| Col1 | Col2 | Col3 |
|
||||||
| :----------- | :------: | ------------: |
|
| :----------- | :------: | ------------: |
|
||||||
@ -309,5 +322,6 @@ Col 1 | Col2 | Col3
|
|||||||
:-- | :-: | --:
|
:-- | :-: | --:
|
||||||
Ugh this is so ugly | make it | stop
|
Ugh this is so ugly | make it | stop
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
For more info, check out John Gruber's official post of syntax [here](http://daringfireball.net/projects/markdown/syntax) and Adam Pritchard's great cheatsheet [here](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
|
For more info, check out John Gruber's official post of syntax [here](http://daringfireball.net/projects/markdown/syntax) and Adam Pritchard's great cheatsheet [here](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
|
||||||
|
Loading…
Reference in New Issue
Block a user