All you need to know about markdown
Short Markdow cheat sheet, and how to write markdown with WordPress, plus some external resources.
18.02.2015 added more Markdown Extra commands
This is a short post, cause there isn’t that much to it, which is why Markdown so awesome.
First I was like, I’m not gonna learn a new language just to write another language, but it’s not a language, your mom can write it, your 102 years old deaf and blind grandgrandpa can write it.
In a nutshell, markdown is an easy way to write HTML. It’s not for writing entire websites, but content for websites, like this post.
Different flavors of markdown
There’s the normal syntax, and then there is the GitHub flavored syntax (GFM). GFM is more advanced. Then there are small differences depending on the parser. Here’s some of the popular parsers:
- Markdown extra (written in PHP)
- CramDown (Ruby)
- redcarpet (Ruby)
This post looks mostly the standard syntax and some of Markdown Extra.
Have a blank line that’ll start a new paragraph. If you want a just a simple line break
<br> leace two on more spaces in the end of a line.
[My Blog] [Another Link] : http://clubmate.fi : http://example.com
- Unordered list, list item 1 - Unordered list, list item 2 - Unordered list, list item 3 1. Ordered list, list item 1 2. Ordered list, list item 2 7. Ordered list, list item 3 8. Ordered list, list item 4 6. Ordered list, list item 5
Code (those are back-ticks, not single quotes):
Traditionally you’d make code blocks with by inserting 4 space characters in from of the line
└─┬─┘ └── Believe it or not, there are 4 space there
In Markdow Extra (a flavour of Markdown) fenced code blocks are possible with the back ticks:
# H1 ## h2 ### h3
Images (I’ve never used this really)
Definition lists, this is specific to Markdown Extra:
Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. : An American computer company. Orange : The fruit of an evergreen tree of the genus Citrus.
That’s the very basics that’ll get you far, if not to the end.
- Markdown On Save Improved is pretty sweet, but deprecated
- Jetpack has a new Markdown module that also supports GFM (to an extent)
- Markdown On Save should be a solid plugin also
- GitHub-Flavored Markdown Comments