Skip to content

Instantly share code, notes, and snippets.

@maxandersen
Last active August 29, 2015 14:21
Show Gist options
  • Save maxandersen/97480b55ebc97a5a1f1b to your computer and use it in GitHub Desktop.
Save maxandersen/97480b55ebc97a5a1f1b to your computer and use it in GitHub Desktop.
asciidoc cheat sheet

AsciiDoc Cheat Sheet

Phrase Modifiers

`inline code` - rendered as inline code

`inline code` - rendered as inline code

*strong* - rendered as strong

_strong_ - rendered as strong

*emphasis* - rendered as emphasis

_emphasis_ - rendered as emphasis

Block Modifiers

Code Blocks

To create a code block use four ---- to start it.

 ----
 int x = 0; // example code block
 x = x + 1;
 ----
Paragraphs

Paragraphs are consecutive lines of text separated by one or more blank lines. End a line with two or more spaces to create a line break.

Headings
= This is an H1
== This is an H2
== This is also an H2
===== This is an H5
Lists

Unordered lists use * as bullets.

*   one
*   two
**  next level
  • one

  • two

    • next level

Numbered lists use . :

.  one
.  two
  1. one

  2. two

Block Quotes
> Block quotes use email-style quoting
> second quoted line

Block quotes use email-style quoting second quoted line

Horizontal Rule

A horizontal rule is created with 3 ticks

'''

http://www.example.com - rendered as http://www.example.com

http://www.example.com - rendered as Text

link:index.html - Text

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

Images

image:path/to/image.png[[Optional title]]

@lordofthejars
Copy link

Maybe also the simple quotes:

'`single curved quotes`'
"`double curved quotes`"

Also in case of block quotes, I think it is something that offers asciidoctor but not AsciiDoc. the way of creating block quotes in AsciiDoc is:

[quote, Abraham Lincoln, Address delivered at the dedication of the Cemetery at Gettysburg]
____
Four score and seven years ago our fathers brought forth
on this continent a new nation...
____

But in Asciidoctor we also support markdown style.

@maxandersen
Copy link
Author

my intent is mainly to focus on asciidoctor variation since its so much more accessible - not sure if I'll be able to handle all the variations yet ;)

@nickboldt
Copy link

Why do you have two identical examples to render bold and italic?

Also, http://asciidoctor.org/docs/asciidoc-syntax-quick-reference

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