markdown
🌱 This post is in the growth phase. It may still be useful as it grows up.
This document describes markdown in terms of Prettier defaults. If you don’t use prettier, find syntax alternatives on Daring Fireball.
Many examples have been used from the Daring Firebal documentation.
GitHub Flavored Markdown (GFM)
Most code environments use custom Markdown parser called GitHub Flavored Markdown (GFM).
The most notable difference is how GFM handles code blocks — using a code fence.
I include (GFM)
where GFM-specific syntax is demonstrated.
Contents
- Headings
- Blockquote
- Lists
- Lists of paragraphs
- Lists with markdown
- Code inline
- Code block (GFM)
- Horizontal Rule
- Link
- Emphasis
- Emphasis
- Image
- details
Headings
Blockquote
Nested blockquote
This is the first level of quoting.
This is nested blockquote.
Back to the first level.
Blockquotes support markdown
This is a header.
- This is the first list item.
- This is the second list item.
Here’s some example code:
Examples from Daring Fireball
Lists
Unordered
Ordered
Ordered lists are alway consecutive.
The only number that makes a difference is first. Anything other than 1
, sets the start
value on the <ol>
.
output:
Lists of paragraphs
Lists with markdown
Code inline
Code block (GFM)
Nested markdown code
Add more backticks for infinite nesting.
Horizontal Rule
Link
This syntax can often be hard to remember.
Someone recommended thinking of it as calling a named function with the url. It’s stuck with me ever since.
Basic
Automatic
Automatic entity encoded email
Output:
This last part more interesting than anything else. Surely bots decode this.
Reference style
Reference
Emphasis
Mid-word emphasis
Escape empahasis
Emphasis
Definition
- NOT case sensetive.
- CAN be defined anywhere in the document.
Shorthand reference
Image
Reference style
See Link for more reference style options.
details
Raw markdown
Markdown supports HTML and, therefore, details. However, in order to put markdowndown inside of a summary, there needs to be additional line-breaks between HTML elements and markdown blocks.
Some disclosure
Markdown can go in here if you leave extra line breaks.
markdown-it plugins
markdown-it-container can be used to create definition lists.