• Stars
    star
    144
  • Rank 249,638 (Top 6 %)
  • Language
    Perl
  • Created about 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Asciidoc cheatsheet for GitHub

Asciidoc cheatsheet for GitHub

GitHub limitations

This cheatsheet contains small part of Asciidoc markup which works and looks fine on GitHub. There is also full cheatsheet, but for now it’s main use is to show bugs, design issues, GitHub limitations and other differences from how Asciidoc cheatsheet should really looks like.

GitHub Wiki has own limitations, check this cheatsheet in wiki.
GitHub Gist has own limitations, check this cheatsheet in gist.

You can try these browser add-ons to fix some issues:

Attributes

// Header of this document:

Asciidoc cheatsheet for GitHub
==============================
:toc:
:toc-placement: preamble
:toclevels: 1
:Some attr: Some value

// Need some preamble to get TOC:
{empty}
Some attr's value is {someattr}.
Escaped: \{someattr} and +++{someattr}+++.

Some attr’s value is Some value. Escaped: {someattr} and {someattr}.

Section titles

== Level 1
Text.

=== Level 2
Text.

==== Level 3
Text.

===== Level 4
Text.

Level 1

Text.

Level 2

Text.

Level 3

Text.

Level 4

Text.

Paragraphs

.Optional Title
Usual
paragraph.

Second paragraph.
Optional Title

Usual paragraph.

Second paragraph.

.Optional Title

 Literal paragraph.
  Must be indented.
Optional Title
Literal paragraph.
 Must be indented.
.Optional Title
[source,perl]
die 'connect: '.$dbh->errstr;

Not a code in next paragraph.
Optional Title
die 'connect: '.$dbh->errstr;

Not a code in next paragraph.

.Optional Title
NOTE: This is an example
      single-paragraph note.
Note
Optional Title
This is an example single-paragraph note.
.Optional Title
[NOTE]
This is an example
single-paragraph note.
Note
Optional Title
This is an example single-paragraph note.
TIP: Some tip text.

IMPORTANT: Some important text.

WARNING: Some warning text.

CAUTION: Some caution text.
Tip
Some tip text.
Important
Some important text.
Warning
Some warning text.
Caution
Some caution text.

Blocks

.Optional Title
----
*Listing* Block

Use: code or file listings
----
Optional Title
*Listing* Block

Use: code or file listings
.Optional Title
[source,perl]
----
# *Source* block
# Use: highlight code listings
use DBI;

my $dbh = DBI->connect('...',$u,$p)
    or die "connect: $dbh->errstr";
----
Optional Title
# *Source* block
# Use: highlight code listings
use DBI;

my $dbh = DBI->connect('...',$u,$p)
    or die "connect: $dbh->errstr";
.Optional Title
[NOTE]
====
*NOTE* Block

Use: multi-paragraph notes.
====
Note
Optional Title

NOTE Block

Use: multi-paragraph notes.

.Optional Title
[quote, cite author, cite source]
____
*Quote* Block

Use: cite somebody
____
Optional Title

Quote Block

Use: cite somebody

— cite author
cite source
////
*Comment* block

Use: hide comments
////
++++
*Passthrough* Block
<p>
Use: GitHub-restricted subset of HTML markup
<table border="1">
<tr><td>1</td><td>2</td></tr>
</table>
++++
*Passthrough* Block

Use: GitHub-restricted subset of HTML markup

12
 .Optional Title
 ....
 *Literal* Block

 Use: workaround when literal
 paragraph (indented) like
   1. First.
   2. Second.
 incorrectly processed as list.
 ....
Optional Title
*Literal* Block

Use: workaround when literal
paragraph (indented) like
  1. First.
  2. Second.
incorrectly processed as list.

Text

forced +
line break

forced
line break

normal, 'italic', _italic_, *bold*.

+mono *bold*+, `mono pass thru *bold*`

``double quoted'', `single quoted'.

normal, ^super^, ~sub~.

normal, italic, italic, bold.

mono bold, mono pass thru *bold*

“double quoted”, ‘single quoted’.

normal, super, sub.

Chars: n__i__**b**++m++n

Chars: nibmn

// Comment
(C) (R) (TM) -- ... -> <- => <= &#182;

© ® ™ — …​ → ← ⇒ ⇐ ¶

''''

Escaped:
\_italic_, +++_italic_+++,
t\__e__st, +++t__e__st+++,
\&#182;

Escaped: _italic_, _italic_, t__e__st, t__e__st, &#182;

If you’ll need to use space in url/path you should replace it with %20.

[[anchor-1]]
Paragraph or block 1.

<<anchor-1>>,
<<anchor-1,First anchor>>,
xref:anchor-1[],
xref:anchor-1[First anchor].

Paragraph or block 1.

link:README.adoc[This document]
link:/README.adoc[]
http://google.com
http://google.com[Google Search]
mailto:root@localhost[email admin]
First home
image:images/icons/home.png[]
, second home
image:images/icons/home.png[Alt text]
.

.Block image
image::images/icons/home.png[]
image::images/icons/home.png[Alt text]

.Thumbnail linked to full image
image:/images/font/640-screen2.gif[
"My screenshot",width=128,
link="/images/font/640-screen2.gif"]

First home home , second home Alt text .

home
Figure 1. Block image
Alt text
Thumbnail linked to full image

My screenshot

Lists

.Bulleted
* bullet
* bullet
  - bullet
  - bullet
* bullet
** bullet
** bullet
*** bullet
*** bullet
**** bullet
**** bullet
***** bullet
***** bullet
**** bullet
*** bullet
** bullet
* bullet
Bulleted
  • bullet

  • bullet

    • bullet

    • bullet

  • bullet

    • bullet

    • bullet

      • bullet

      • bullet

        • bullet

        • bullet

          • bullet

          • bullet

        • bullet

      • bullet

    • bullet

  • bullet

.Bulleted 2
- bullet
  * bullet
  ** bullet
     *** bullet
Bulleted 2
  • bullet

    • bullet

      • bullet

        • bullet

.Ordered
. number
. number
  .. lower roman
  .. lower roman
. number
.. lower roman
.. lower roman
... lower alpha
... lower alpha
.... lower alpha
.... lower alpha
..... lower alpha
..... lower alpha
.... lower alpha
... lower alpha
.. lower roman
. number
Ordered
  1. number

  2. number

    1. lower roman

    2. lower roman

  3. number

    1. lower roman

    2. lower roman

      1. lower alpha

      2. lower alpha

        1. lower alpha

        2. lower alpha

          1. lower alpha

          2. lower alpha

        3. lower alpha

      3. lower alpha

    3. lower roman

  4. number

.Ordered 2
a. lower alpha
b. lower alpha
   .. lower roman
   .. lower roman
       .  lower alpha
       .  lower alpha
           1. lower alpha
           2. lower alpha
           3. lower alpha
           4. lower alpha
       .  lower alpha
   .. lower roman
c. lower alpha
Ordered 2
  1. lower alpha

  2. lower alpha

    1. lower roman

    2. lower roman

      1. lower alpha

      2. lower alpha

        1. lower alpha

        2. lower alpha

        3. lower alpha

        4. lower alpha

      3. lower alpha

    3. lower roman

  3. lower alpha

.Labeled
Term 1::
    Definition 1
Term 2::
    Definition 2
    Term 2.1;;
        Definition 2.1
    Term 2.2;;
        Definition 2.2
Term 3::
    Definition 3
Term 4:: Definition 4
Term 4.1::: Definition 4.1
Term 4.2::: Definition 4.2
Term 4.2.1:::: Definition 4.2.1
Term 4.2.2:::: Definition 4.2.2
Term 4.3::: Definition 4.3
Term 5:: Definition 5
Labeled
Term 1

Definition 1

Term 2

Definition 2

Term 2.1

Definition 2.1

Term 2.2

Definition 2.2

Term 3

Definition 3

Term 4

Definition 4

Term 4.1

Definition 4.1

Term 4.2

Definition 4.2

Term 4.2.1

Definition 4.2.1

Term 4.2.2

Definition 4.2.2

Term 4.3

Definition 4.3

Term 5

Definition 5

.Labeled 2
Term 1;;
    Definition 1
    Term 1.1::
        Definition 1.1
Labeled 2
Term 1

Definition 1

Term 1.1

Definition 1.1

[horizontal]
.Labeled horizontal
Term 1:: Definition 1
Term 2:: Definition 2

Term 3::
    Definition 3

Term 4:: Definition 4
Labeled horizontal
Term 1

Definition 1

Term 2

Definition 2

Term 3

Definition 3

Term 4

Definition 4

[qanda]
.Q&A
Question 1::
    Answer 1
Question 2:: Answer 2
Q&A
  1. Question 1

    Answer 1

  2. Question 2

    Answer 2

.Break two lists
. number
. number

Independent paragraph break list.

. number

.Header break list too
. number

--
. List block define list boundary too
. number
. number
--

. number
. number
Break two lists
  1. number

  2. number

Independent paragraph break list.

  1. number

Header break list too
  1. number

  1. List block define list boundary too

  2. number

  3. number

  1. number

  2. number

.Continuation
- bullet
continuation
. number
  continuation
* bullet

  literal continuation

.. letter
+
Non-literal continuation.
+
----
any block can be

included in list
----
+
Last continuation.
Continuation
  • bullet continuation

    1. number continuation

      • bullet

        literal continuation
        1. letter

          Non-literal continuation.

          any block can be
          
          included in list

          Last continuation.

.List block allow sublist inclusion
- bullet
  * bullet
+
--
    - bullet
      * bullet
--
  * bullet
- bullet
  . number
    .. lower alpha
+
--
      . number
        .. lower alpha
--
    .. lower alpha
  . number
List block allow sublist inclusion
  • bullet

    • bullet

      • bullet

        • bullet

    • bullet

  • bullet

    1. number

      1. lower alpha

        1. number

          1. lower alpha

      2. lower alpha

    2. number

Tables

.An example table
[options="header,footer"]
|=======================
|Col 1|Col 2      |Col 3
|1    |Item 1     |a
|2    |Item 2     |b
|3    |Item 3     |c
|6    |Three items|d
|=======================
Table 1. An example table
Col 1 Col 2 Col 3

1

Item 1

a

2

Item 2

b

3

Item 3

c

6

Three items

d

.CSV data
[format="csv",cols="4"]
|======
1,2,3,4
a,b,c,d
A,B,C,D
|======
Table 2. CSV data

1

2

3

4

a

b

c

d

A

B

C

D

[format="csv"]
[options="header",cols=",,s,,m"]
|===========================
ID,FName,LName,Address,Phone
1,Vasya,Pupkin,London,+123
2,X,Y,"A,B",45678
|===========================
ID FName LName Address Phone

1

Vasya

Pupkin

London

+123

2

X

Y

A,B

45678

.Multiline cells, row/col span
|====
|Date |Duration |Avg HR |Notes

|22-Aug-08 .2+^.^|10:24 | 157 |
Worked out MSHR (max sustainable
heart rate) by going hard
for this interval.

|22-Aug-08 | 152 |
Back-to-back with previous interval.

|24-Aug-08 3+^|none

|====
Table 3. Multiline cells, row/col span
Date Duration Avg HR Notes

22-Aug-08

10:24

157

Worked out MSHR (max sustainable heart rate) by going hard for this interval.

22-Aug-08

152

Back-to-back with previous interval.

24-Aug-08

none

More Repositories

1

go-monolith-example

Example Go monolith with embedded microservices and The Clean Architecture
Go
290
star
2

dockerize

Utility to simplify running applications in docker containers
Go
177
star
3

go-service-example

Example Go service using go-swagger and Clean Architecture
Go
161
star
4

rpc-codec

JSON-RPC 2.0 codec for Go net/rpc standard library
Go
96
star
5

vim-plugin-viewdoc

Vim plugin: flexible viewer for any documentation
Vim Script
89
star
6

vim-plugin-ruscmd

Vim plugin: support command mode in Russian keyboard layout
Vim Script
60
star
7

wcwidth-icons

Support fonts with double-width icons in xterm/rxvt-unicode/zsh/vim/…
C
41
star
8

vim-plugin-autosess

Vim plugin: auto save/load sessions
Vim Script
35
star
9

dotvim

~/.vim/
Vim Script
24
star
10

structlog

Structured logger for Go
Go
19
star
11

vcprompt

Version control information in your prompt
C
14
star
12

powerman-overlay

Powerman's Gentoo overlay
Shell
12
star
13

nerd-fonts-sh

Shell variables with names for Nerd fonts icons
Shell
9
star
14

tail

Go package tail implements behaviour of `tail -F` to follow rotated log files
Go
8
star
15

inferno-re2

OS Inferno driver: re2 library
Limbo
7
star
16

Narada

Framework for ease deploy and support microservice projects
Perl
7
star
17

jquery-tbodyscroll

jQuery plugin: add scrolling for table tbody element
JavaScript
6
star
18

asciidoc-habrahabr-backend

AsciiDoc backend for generating Habrahabr friendly HTML
6
star
19

check

Helpers to complement Go testing package
Go
6
star
20

sensitive

Package sensitive provides base types who's values should never be seen by the human eye, but still used for configuration.
Go
4
star
21

inferno-opt-setup

Setup projects in /opt for OS Inferno
Shell
4
star
22

testcert

TLS certs for use in Go tests
Go
4
star
23

must

Go
4
star
24

inferno-opt-skel

Example skeleton /opt project for OS Inferno
Brainfuck
4
star
25

alpine-runit-volume

Docker base image to run microservice with a data volume
Shell
3
star
26

gh-make-labels

Make labels for GitHub repo
Go
3
star
27

inferno-opt-mkfiles

mkfiles to use in OS Inferno projects compatible with /opt
Shell
3
star
28

inferno-contrib-tap

Limbo module: Test Anything Protocol
Brainfuck
3
star
29

vcprompt-fast

Improved and faster vcprompt: tool to get VCS info in shell PS1 prompt
Go
3
star
30

inferno-cjson

OS Inferno driver: fast JSON tokenizer
Brainfuck
3
star
31

perl-Log-Fast

Perl module: Log::Fast - Fast and flexible logger
Perl
3
star
32

perl-JSON-RPC2

Perl module: JSON::RPC2 - Transport-independent implementation of JSON-RPC 2.0
Perl
3
star
33

pqx

Helpers for use with Go Postgres driver github.com/lib/pq
Go
3
star
34

gotmpl

Command line tool for processing template file using Go text/template syntax
Go
3
star
35

flazsh

Fastest ZSH you've ever seen
Shell
2
star
36

userjs-github-asciidoc

UserJS for GitHub: fix Asciidoc rendering
JavaScript
2
star
37

vim-plugin-fixtermkeys

Fix terminal Ctrl Alt Shift modifiers for keys like Tab CR Space BS cursor and others
Vim Script
2
star
38

vaultgnupg

Scripts to link ansible-vault and GnuPG
Shell
2
star
39

getenv

Parse environment variables for Go
Go
2
star
40

deepequal

Go package with improved reflect.DeepEqual
Go
2
star
41

gotest

Helpers for Go tests
Go
2
star
42

structlog-usage-example

Usage example for Go package github.com/powerman/structlog
Go
2
star
43

narada4d

Manage data schema version
Go
2
star
44

appcfg

Get valid application configuration from flags/env/config files/consul/… for Go
Go
2
star
45

perl-Test-Mock-Time

Perl module: Test::Mock::Time - Deterministic time & timers for event loop tests
Perl
2
star
46

grub2-theme-powerman

Grub2 gfxmenu theme "Powerman"
2
star
47

inferno-contrib-retrymount

Automatically retry mount if mount point become unaccessible in OS Inferno
Brainfuck
2
star
48

inferno-contrib-hashtable

Limbo module: polymorphic hash table
Brainfuck
1
star
49

perl-Async-Defer

Perl module: Async::Defer - VM to write and run async code in usual sync-like way
Perl
1
star
50

perl-IO-Stream-HTTP-Persistent

Perl module: IO::Stream::HTTP::Persistent - HTTP persistent connections plugin
Perl
1
star
51

inferno-contrib-regmonitor

Limbo module: monitor registry(4) services
Brainfuck
1
star
52

perl-MojoX-JSONRPC2-HTTP

Perl module: MojoX::JSONRPC2::HTTP - Client for JSON RPC 2.0 over HTTP
Perl
1
star
53

narada-plugin-mojo

Mojolicious webapp for Narada projects
ApacheConf
1
star
54

inferno-contrib-growing

Limbo module: dynamically growing arrays
Brainfuck
1
star
55

narada-base

Base files used to initialize new Narada projects
1
star
56

inferno-contrib-logger

Limbo module: verbose logger
Brainfuck
1
star
57

asciidoc-9man-backend

AsciiDoc backend for generating man pages for OS Inferno and Plan9
1
star
58

sqlxx

General purpose extensions to golang's github.com/jmoiron/sqlx
Go
1
star
59

inferno-contrib-iobuf

Limbo module: buffered read/write
Brainfuck
1
star
60

inferno-contrib-watchdog

Watchdog for running services in OS Inferno
Brainfuck
1
star
61

chanq

Go package provides outgoing queue for channel to use in select case
Go
1
star
62

nginx-config

Nginx boilerplate config
DIGITAL Command Language
1
star
63

perl-IO-Stream-Proxy-SOCKSv5

Perl module: IO::Stream::Proxy::SOCKSv5 - SOCKSv5 proxy plugin for IO::Stream
Perl
1
star
64

constvar

Constant values in global Go variables
Go
1
star
65

urlvalues

Go package for unmarshaling url.Values to struct with strict validation
Go
1
star
66

conv

Convert types for Go
Go
1
star
67

perl-Mojolicious-Plugin-JSONRPC2

Perl module: Mojolicious::Plugin::JSONRPC2 - JSON RPC 2.0 over HTTP
Perl
1
star
68

perl-Inferno-RegMgr

Perl module: Inferno::RegMgr - Keep connection to OS Inferno's registry(4) and it tasks
Perl
1
star
69

mysqlx

Helpers for use with Go MySQL driver github.com/go-sql-driver/mysql
Go
1
star
70

inferno-contrib-register

Keep given service addr/attrs registered in OS Inferno registry
Brainfuck
1
star
71

perl-Crypt-MatrixSSL3

Perl module: Crypt::MatrixSSL3 - Perl extension for SSL and TLS using MatrixSSL.org
Perl
1
star
72

perl-Sub-Throttler

Perl module: Sub::Throttler - Rate limit sync and async function calls
Perl
1
star
73

perl-IO-Stream-Proxy-SOCKSv4

Perl module: IO::Stream::Proxy::SOCKSv4 - SOCKSv4 proxy plugin for IO::Stream
Perl
1
star
74

perl-IO-Stream-Proxy-HTTPS

Perl module: IO::Stream::Proxy::HTTPS - HTTPS proxy plugin for IO::Stream
Perl
1
star
75

go-service-stateless-example

Example how to build and test stateless Go microservice with Docker, Consul and Nginx
Go
1
star