Markdown 101: Kitchen SinkJan 1, 2019Misc 1517 words
Markdown 101: Kitchen Sink
Photo by Yancy Min on Unsplash
Table Of Contents

Markdown Test Page

This is intended as a quick reference and showcase for how this Blog will render Markdown using gatsby-transformer-remark and various plugins.

For more complete info on Markdown Syntax, see John Gruber’s original spec and the Github-flavored Markdown info page.

Headers

# H1
## H2
### H3
#### H4
##### H5
###### H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1
======

Alt-H2
------

Heading 1

But the streamer in the panel is far from a big-time broadcaster. Known as Michael “mmDust” Duarte, he is a Twitch affiliate known for speed running Resident Evil 7 who currently holds world records for beating the game as quickly as possible. Since the panel, mmDust initially doubled down on his comments, only to joke about them and eventually apologize in a Twitlonger.

Heading 2

Students from Boston University to UCLA, from South Louisiana Community College to Northwestern University, have recently created or resurrected Minecraft servers and shared their creations on Discord chats, in Facebook meme groups, and on Reddit threads. The boom of college Minecraft servers has begun. These servers have the express purpose of bringing students together and building, oftentimes focused on recreating their college campuses. Searches for Minecraft server hosting have peaked to unprecedented levels in the last few weeks, and thousands of students are discussing college servers, most notably on the Facebook group “Zoom Memes for Self Quaranteens.”

Heading 3

Twitch is also relaunching its twitchsports channel today to highlight broadcasts and programming. The relaunch includes a showcase today, hosted by Major League Soccer star Jimmy Conrad, that will cover the NBA, UFC, Arsenal, and House of Highlights using two-hour slots to demonstrate the type of sports content Twitch has to offer.

Heading 4

EA will start releasing games on Steam again, after it moved away from the popular PC game marketplace in 2011 in favor of its Origin store and launcher. It’ll start with Star Wars Jedi: Fallen Order, making it the first new EA game released on Steam since 2011. Additionally, EA announced plans to bring its EA Access subscription service to Steam starting next year, allowing players to pay a monthly price for access to a collection of EA games through Steam.

Heading 5

It’s an eclectic lineup, but it’s also one that includes some of the developer’s more influential games. San Andreas is the biggest of the trio and arguably is the most beloved game in the GTA series. It introduced the world to the fictional version of California that would also be the setting for the best-selling Grand Theft Auto V. Midnight Club: Los Angeles, meanwhile, is a racer that came out in 2008, and at present, it’s the last title in the series to be released, while Table Tennis is a shockingly in-depth look at the sport from a developer best-known for violent action games.

Heading 6

Rocket League is changing in a big way. Today, developer Psyonix announced that, later this summer, the multiplayer cars-meets-soccer game will be going free-to-play. Additionally, the game will get cross-platform progression, covering elements like cosmetic items, battle pass progression, and competitive rank.

[Top]

Emphasis

Emphasis, aka italics, with *asterisks* or _underscores_.

Strong emphasis, aka bold, with **asterisks** or __underscores__.

Combined emphasis with **asterisks and _underscores_**.

Strikethrough uses two tildes. ~~Scratch this.~~

Emphasis, aka italics, with asterisks or underscores.

Strong emphasis, aka bold, with asterisks or underscores.

Combined emphasis with asterisks and *underscores*.

Strikethrough uses two tildes. Scratch this.

[Top]

Lists

1. First ordered list item
2. Another item
⋅⋅* Unordered sub-list. 
1. Actual numbers don't matter, just that it's a number
⋅⋅1. Ordered sub-list
4. And another item.

⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

* Unordered list can use asterisks
- Or minuses
+ Or pluses
  1. First ordered list item

  2. Another item

    • Unordered sub-list.
  3. Actual numbers don’t matter, just that it’s a number

    1. Ordered sub-list
  4. And another item.

    You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we’ll use three here to also align the raw Markdown).

    To have a line break without a paragraph, you will need to use two trailing spaces. Note that this line is separate, but within the same paragraph. (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

  • Unordered list can use asterisks
  • Or minuses
  • Or pluses

[Top]

Links

[I'm an inline-style link](https://www.google.com)

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

[I'm a reference-style link][Arbitrary case-insensitive reference text]

[I'm a relative reference to a repository file](../blob/master/LICENSE)

[You can use numbers for reference-style link definitions][1]

Or leave it empty and use the [link text itself].

URLs and URLs in angle brackets will automatically get turned into links. 
http://www.example.com or <http://www.example.com> and sometimes 
example.com (but not on Github, for example).

Some text to show that the reference links can follow later.

[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com

I’m an inline-style link

I’m an inline-style link with title

I’m a reference-style link

I’m a relative reference to a repository file

You can use numbers for reference-style link definitions

Or leave it empty and use the link text itself.

URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or http://www.example.com and sometimes example.com (but not on Github, for example).

Some text to show that the reference links can follow later.

[Top]

Images


Sint ea anim ipsum ad commodo cupidatat do **exercitation** incididunt et minim ad labore sunt. Minim deserunt labore laboris velit nulla incididunt ipsum nulla. Ullamco ad laborum ea qui et anim in laboris exercitation tempor sit officia laborum reprehenderit culpa velit quis. **Consequat commodo** reprehenderit duis [irure](#!) esse esse exercitation minim enim Lorem dolore duis irure. Nisi Lorem reprehenderit ea amet excepteur dolor excepteur magna labore proident voluptate ipsum. Reprehenderit ex esse deserunt aliqua ea officia mollit Lorem nulla magna enim. Et ad ipsum labore enim ipsum **cupidatat consequat**. Commodo non ea cupidatat magna deserunt dolore ipsum velit nulla elit veniam nulla eiusmod proident officia.

![Super wide](http://placekitten.com/1280/800)

_Proident sit veniam in est proident officia adipisicing_ ea tempor cillum non cillum velit deserunt. Voluptate laborum incididunt sit consectetur Lorem irure incididunt voluptate nostrud. Commodo ut eiusmod tempor cupidatat esse enim minim ex anim consequat. Mollit sint culpa qui laboris quis consectetur ad sint esse. Amet anim anim minim ullamco et duis non irure. Sit tempor adipisicing ea laboris `culpa ex duis sint` anim aute reprehenderit id eu ea. Aute [excepteur proident](#!) Lorem minim adipisicing nostrud mollit ad ut voluptate do nulla esse occaecat aliqua sint anim.

![Not so big](http://placekitten.com/480/400)

Incididunt in culpa cupidatat mollit cillum qui proident sit. In cillum aliquip incididunt voluptate magna amet cupidatat cillum pariatur sint aliqua est _enim **anim** voluptate_. Magna aliquip proident incididunt id duis pariatur eiusmod incididunt commodo culpa dolore sit. Culpa do nostrud elit ad exercitation anim pariatur non minim nisi **adipisicing sunt _officia_**. Do deserunt magna mollit Lorem commodo ipsum do cupidatat mollit enim ut elit veniam ea voluptate.

[![Manny Pacquiao](https://img.youtube.com/vi/s6bCmZmy9aQ/0.jpg)](https://youtu.be/s6bCmZmy9aQ)

Reprehenderit non eu quis in ad elit esse qui aute id [incididunt](#!) dolore cillum. Esse laboris consequat dolor anim exercitation tempor aliqua deserunt velit magna laboris. Culpa culpa minim duis amet mollit do quis amet commodo nulla irure.

Sint ea anim ipsum ad commodo cupidatat do exercitation incididunt et minim ad labore sunt. Minim deserunt labore laboris velit nulla incididunt ipsum nulla. Ullamco ad laborum ea qui et anim in laboris exercitation tempor sit officia laborum reprehenderit culpa velit quis. Consequat commodo reprehenderit duis irure esse esse exercitation minim enim Lorem dolore duis irure. Nisi Lorem reprehenderit ea amet excepteur dolor excepteur magna labore proident voluptate ipsum. Reprehenderit ex esse deserunt aliqua ea officia mollit Lorem nulla magna enim. Et ad ipsum labore enim ipsum cupidatat consequat. Commodo non ea cupidatat magna deserunt dolore ipsum velit nulla elit veniam nulla eiusmod proident officia.

Super wide

Proident sit veniam in est proident officia adipisicing ea tempor cillum non cillum velit deserunt. Voluptate laborum incididunt sit consectetur Lorem irure incididunt voluptate nostrud. Commodo ut eiusmod tempor cupidatat esse enim minim ex anim consequat. Mollit sint culpa qui laboris quis consectetur ad sint esse. Amet anim anim minim ullamco et duis non irure. Sit tempor adipisicing ea laboris culpa ex duis sint anim aute reprehenderit id eu ea. Aute excepteur proident Lorem minim adipisicing nostrud mollit ad ut voluptate do nulla esse occaecat aliqua sint anim.

Not so big

Incididunt in culpa cupidatat mollit cillum qui proident sit. In cillum aliquip incididunt voluptate magna amet cupidatat cillum pariatur sint aliqua est enim anim voluptate. Magna aliquip proident incididunt id duis pariatur eiusmod incididunt commodo culpa dolore sit. Culpa do nostrud elit ad exercitation anim pariatur non minim nisi adipisicing sunt officia. Do deserunt magna mollit Lorem commodo ipsum do cupidatat mollit enim ut elit veniam ea voluptate.

Manny Pacquiao

Reprehenderit non eu quis in ad elit esse qui aute id incididunt dolore cillum. Esse laboris consequat dolor anim exercitation tempor aliqua deserunt velit magna laboris. Culpa culpa minim duis amet mollit do quis amet commodo nulla irure.

[Top]

Code and Syntax Highlighting

Inline `code` has `back-ticks around` it.

Inline code has back-ticks around it.

Blocks of code are either fenced by lines with three back-ticks `````, or are indented with four spaces. I recommend only using the fenced code blocks — they’re easier and only they support syntax highlighting.

​```javascript
var s = "JavaScript syntax highlighting";
alert(s);
​```
 
​```python
s = "Python syntax highlighting"
print s
​```
 
​```
No language indicated, so no syntax highlighting. 
But let's throw in a <b>tag</b>.
​```
var s = "JavaScript syntax highlighting";
alert(s);
s = "Python syntax highlighting"
print s
No language indicated, so no syntax highlighting. 
But let's throw in a <b>tag</b>.

Line Numbering

​```javascript{numberLines: true}
// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        `gatsby-remark-prismjs`,
      ]
    }
  }
]
​```
// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        `gatsby-remark-prismjs`,
      ]
    }
  }
]

You can also start numbering at any index you wish (here, numbering will start at index 5):

​```javascript{numberLines: 5}
// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        `gatsby-remark-prismjs`,
      ]
    }
  }
]
// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        `gatsby-remark-prismjs`,
      ]
    }
  }
]

Line highlighting

You can also add line highlighting. It adds a span around lines of code with a special class .gatsby-highlight-code-line that you can target with styles. See this README for more info.

​```javascript{1,4-6}
// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        `gatsby-remark-prismjs`,
      ]
    }
  }
]
// In your gatsby-config.jsplugins: [
  {
    resolve: `gatsby-transformer-remark`,    options: {      plugins: [        `gatsby-remark-prismjs`,
      ]
    }
  }
]

To highlight lines, you can use one of the following directives as comments in your code:

  • highlight-line highlights the current line;
  • highlight-next-line highlights the next line;
  • highlight-start highlights the lines until the matching hightlight-end;
  • highlight-range{1, 4-6} will highlight the next line, and the fourth, fifth and sixth lines.
class FlavorForm extends React.Component {  constructor(props) {
    super(props);
    this.state = {value: 'coconut'};

    this.handleChange = this.handleChange.bind(this);
    this.handleSubmit = this.handleSubmit.bind(this);
  }

  handleChange(event) {
    this.setState({value: event.target.value});  }

  handleSubmit(event) {    alert('Your favorite flavor is: ' + this.state.value);    event.preventDefault();  }
  render() {
    return (
      <form onSubmit={this.handleSubmit}>        <label>
          Pick your favorite flavor:
          <select value={this.state.value} onChange={this.handleChange}>            <option value="grapefruit">Grapefruit</option>            <option value="lime">Lime</option>            <option value="coconut">Coconut</option>            <option value="mango">Mango</option>          </select>        </label>
        <input type="submit" value="Submit" />
      </form>    );
  }
}

Shell prompt

To show fancy prompts next to shell commands (only triggers on bash and shell), either set prompt.global to true in gatsby-config.js, or pass at least one of {outputLines: <range>}, {promptUser: <user>}, or {promptHost: <host>} to a snippet

cd go/to/a/really/long/directory/from/where/ever/i/am/right/now

By default, every line gets a prompt appended to the start, this behaviour can be changed by specifying {outputLines: <range>} to the language.

```shell{outputLines: 2-10,12}

The user and host used in the appended prompt is pulled from the prompt.user and prompt.host values, unless explicitly overridden by the promptUser and promptHost options in the snippet, e.g.:

```shell{promptUser: alice}{promptHost: dev.localhost}

[Top]

Table

Tables aren’t part of the core Markdown spec, but they are part of GFM and Markdown Here supports them. They are an easy way of adding tables to your email — a task that would otherwise require copy-pasting from another application.

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the 
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Colons can be used to align columns.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don’t need to make the raw Markdown line up prettily. You can also use inline Markdown.

Markdown Less Pretty
Still renders nicely
1 2 3

[Top]

Blockquotes

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.

External demand - or exports minus imports - shaved one-tenth of a percentage point off gross domestic product. This matched the median estimate, but a breakdown of the data showed exports fell 1. 8 percent quarter-on-quarter, the fastest decline in more than three years. Japan’s economy is likely to resume growth in the current quarter, but falling exports suggest this recovery could be hampered by trade protectionism, which could increase pressure on policymakers to turn to fiscal stimulus.

> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. 

Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.

External demand - or exports minus imports - shaved one-tenth of a percentage point off gross domestic product. This matched the median estimate, but a breakdown of the data showed exports fell 1. 8 percent quarter-on-quarter, the fastest decline in more than three years. Japan’s economy is likely to resume growth in the current quarter, but falling exports suggest this recovery could be hampered by trade protectionism, which could increase pressure on policymakers to turn to fiscal stimulus.

This is a very long line that will still be quoted properly when it wraps. Oh boy let’s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.

[Top]

Collapsible Section

<details>
<summary>I could use some help...</summary>


public class Order
{
    public int OrderId { get; set; }
    public int CustomerId { get; set; }

    public List<int> Products { get; set; }
}
</details>  
I could use some help...
public class Order
{
    public int OrderId { get; set; }
    public int CustomerId { get; set; }

    public List<int> Products { get; set; }
}

[Top]

Horizontal Rule

Three or more...

---

Hyphens

***

Asterisks

___

Underscores

Three or more…


Hyphens


Asterisks


Underscores

[Top]

Footnotes

Some Markdown Content1 Another Content Some More Content2


  1. First Footnote
  2. Second Footnote