Skip to content

Instantly share code, notes, and snippets.

@arronhunt
Last active August 28, 2024 16:52
Show Gist options
  • Save arronhunt/5be5f4fcf6ee7f99a046de9a59945f83 to your computer and use it in GitHub Desktop.
Save arronhunt/5be5f4fcf6ee7f99a046de9a59945f83 to your computer and use it in GitHub Desktop.
test-markdown-file
layout title
post
Blogging Like a Hacker

GitHub Markdown Kitchen Sink

A large collection of code samples which have been tested against GitHub's markdown parser... so you don't have to.

Resources

This Repo
  • README.md (preview, raw) – this file
  • TEST.md (preview, raw) — used to test the examples from this file, which are pre-generated
Markdown

Code Examples with Preview

Block Elements

CodePreview
Paragraph
This is a paragraph.
This is a paragraph.
Headers (Sextext-style)
Header 1
========

Header 2 --------

Header 1

Header 2

Headers (Atx-style)
# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6
Headers (Atx-style closed)
# Header 1 #
## Header 2 ##
### Header 3 ###
#### Header 4 ####
##### Header 5 #####
###### Header 6 #####

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6
Blockquote
> Lorem ipsum dolor sit amet [...]
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
Blockquote with nested elements
> ## This is a header.
> 1. This is the first list item.
> 2. This is the second list item.
>
> Here's some example code:
>
>     Markdown.generate();

This is a header.

  1. This is the first list item.
  2. This is the second list item.

Here's some example code:

Markdown.generate();
List
- Red
- Green
- Blue
+ Red
+ Green
+ Blue
* Red
* Green
* Blue
  • Red
  • Green
  • Blue
Ordered List
1. Buy flour and salt
1. Mix together with water
1. Bake
  1. Buy flour and salt
  2. Mix together with water
  3. Bake
Code Block
Normal paragraph.
    Code

Normal paragraph.

Code
Horizontal Rules
* * *



---------------------------------------






Inline Elements

CodePreview
Links
This is [an example](http://example.com "Example") link.

This link has no title attr.

This is [an example] [id] reference-style link.

[id]: http://example.com "Optional Title"

This is an example link.

This link has no title attr.

This is an example reference-style link.

Emphasis
*single asterisks*

single underscores

double asterisks

double underscores

single asterisks

single underscores

double asterisks

double underscores

Code
This paragraph has some `code` in it.

This paragraph has some code in it.

Image
![Alt Text](https://get.svg.workers.dev/?s=64&f=gray "Image Title")

Alt Text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment