Markdown
External
- Github "Mastering Markdown" https://guides.github.com/features/mastering-markdown/
Internal
Overview
Markdown is a lightweight syntax for styling all forms of writing on the GitHub platform. It is automatically interpreted on GitHub when found in Gists, comments in Issues and Pull Requests and files with .md or .markdown extension.
Headers
# This is a <h1> header ## This is a <h2> header ... ##### This is a <h5> header
There must be at least one space between '#' and the header text!
Italic
*This text will be italic* _This text will also be italic_
Bold
**This text will be bold** __This text will also be bold__
Italic and bold can be combined.
Colors
<font color=magenta>something
This does not seem to work with GitHub.
Link
Link to an External URL
The http:// URL specified in text are automatically converted to links. Otherwise:
[Text](url)
the URL can be absolute or relative.
Link to an Anchor
Create the anchor:
Link to it:
Link to a Header
If the header does not contain spaces, the link should include the lower-capitalized header text
[Link Text](#header)
Example:
# Blue
[Link Text](#blue)
If the header contains spaces ...
Image
![Alt Text](url)
the URL can be absolute or relative.
Unnumbered List
Use stars or dashes as follows:
* Item 1 * Item 2 * Item 2a * Item 2b
- Item 1 - Item 2 - Item 2a - Item 2b
Numbered List
1. Item 1 2. Item 2 * Item 2a * Item 2b
Blockquotes
Use the '>' at the beginning of the line
> this is in > blockquotes
Inline Code
Backticks
blah blah blah `this will show up as code <blah>` then blah blah blah
Four leading spaces
This will show up normal and this will show up as code normal again
Four Dashes
Works in GitHub, not sure if it works generically. When I find out, update this.
---- oc whoami ----
Code Fencing (GitHub Specific)
Specific to GitHub, allows multiple lines without indentation:
``` this will show up as code ```
For syntax highlighting, specify the language:
```javascript blah blah blah ```
GitHub Specific Markdown
Strikethrough
~~will be stroke through~~
User Reference (Mention)
@github-user-id
This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization.
Task Lists
- [x] item checked - [x] another item checked - [ ] item that is not checked
Tables
First Header|Second Header ------------|------------- cell 1 | cell 2 cell 3 | cell 4
Repository References
SHA References
Any reference to a commit’s SHA-1 hash will be automatically converted into a link to that commit on GitHub.
16c999e8c71134401a78d4d46435517b2271d6ac mojombo@16c999e8c71134401a78d4d46435517b2271d6ac mojombo/github-flavored-markdown@16c999e8c71134401a78d4d46435517b2271d6ac
Issue References
Any number that refers to an Issue or Pull Request will be automatically converted into a link.
#1 mojombo#1 mojombo/github-flavored-markdown#1