Skip to content

Instantly share code, notes, and snippets.

@benstr
Created January 31, 2014 22:11
Show Gist options
  • Save benstr/8744304 to your computer and use it in GitHub Desktop.
Save benstr/8744304 to your computer and use it in GitHub Desktop.
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph text Inline Code text Mistaken text. Italics Bold


Tasks

  • a task list item
  • list syntax required
  • normal formatting
  • incomplete
  • completed

Code Blocks

4 space indention
makes full-width
standard code blocks
var now = new Date();

var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}
today =  days[now.getDay()] + ", " +
         months[now.getMonth()] + " " +
         date + ", " +
         (fourdigits(now.getYear())) ;

document.write(today);
#sc_drag_area {
  height:100px;
  left:150px;
  position: absolute;
  top:100px;
  width:250px;
  z-index: 9999;
}

  • List item one
  • List item two
    • A nested item

  1. Number list item one 1.1. A nested item
  2. Number list item two
  3. Number list item three

Quote

Second line Quote


Standard link = http://ghost.org Custom Text Link


Image


Table

Left-Aligned Center Aligned Right Aligned
col 3 is some wordy text $1600
col 2 is centered $12
zebra stripes are neat $1
@icewhite
Copy link

icewhite commented Feb 22, 2018

Good reference @benstr but your headings aren't appearing formatted - fix by adding a space after the '#'.

@chenlola
Copy link

Thanks for your CheatSheet and icewhite's tips

@ged1959
Copy link

ged1959 commented Jun 24, 2018

Thanks! I have forked this.

@deergod1
Copy link

deergod1 commented Jul 9, 2018

I forked this and fixed the glitches in the Headings and list items. You kind of have to fork or download to see the actual markdown text for most of the formatting. Raw just shows another view of the formatted markdown.

@gparvind
Copy link

gparvind commented Apr 15, 2019

Thanks for the cheatsheet.
One more important point for someone who is not aware: for markdown to work, the file name has to have .md extension.

@jayaramanp
Copy link

Thanks for the cheatsheet.
One more important point for someone who is not aware: for markdown to work, the file name has to have .md extension.

Thank you for this!! Struggled with it for a bit to figure out why my markdowns weren't taking.

@tobygal
Copy link

tobygal commented Dec 9, 2019

Thank you, this was helpful.

@protyay
Copy link

protyay commented Jan 6, 2020

Thanks for the cheatsheet.
One more important point for someone who is not aware: for markdown to work, the file name has to have .md extension.

Thanks for THIS very useful suggestion

@Saket94
Copy link

Saket94 commented Jan 22, 2020

kkkkkk

@HerrPi
Copy link

HerrPi commented Feb 6, 2020

You have to underline your headings-to-be with "=" (h1) and with "-" (h2). Don't know about h3 and the others yet.

@derrick-daniel
Copy link

Thanks! I've forked this and fixed the unformatted heading by adding a space after the '#' symbol.

@easyjobber
Copy link

Thanks it was very hepful

@ralexrdz
Copy link

Any idea how to create a copy to clipboard button on fenced code blocks?

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