AsciiDoc

AsciiDoc%20Docs 2088E9?logo=quickLook&logoColor=white AsciiDoc%20Reference DF7716?logo=devbox&logoColor=white

Antora%20Docs 2088E9?logo=quickLook&logoColor=white

Cheat Sheet

Internal Link
https://javowiec.dev[This is Internal Link]
External Link
https://javowiec.dev[This is External Link^]
External Link with spaces and special characters
link:++https://example.org/?q=[a b]++[This is External Link with spaces and special characters^]
Internal Shield Link

Example 2088E9?logo=quickLook

image:https://img.shields.io/badge/Example-2088E9?logo=quickLook[xref=index.adoc]
External Shield Link

Some%20Documentation 2088E9?logo=quickLook

image:https://img.shields.io/badge/Some%20Documentation-2088E9?logo=quickLook[link="https://javowiec.dev",window=_blank]

Shield parameters → CLICK HERE

Icons → CLICK HERE

Anchors and Cross-References

Anchors

Inline Anchor

Block Anchor

[[inline-anchor]]Inline Anchor

[#block-anchor]
Block Anchor
Cross-Reference

This is Cross-Reference to [inline-anchor]

This is Cross-Reference to [block-anchor]

This is Cross-Reference to Includes Section

This is Cross-Reference to Includes

This is Cross-Reference to <<inline-anchor>>

This is Cross-Reference to <<block-anchor>>

This is Cross-Reference to <<_includes,Includes Section>>

This is Cross-Reference to <<_includes>>
Inter-Document Cross-Reference

This is Inter-Document Cross-Reference to Resources

This is Inter-Document Cross-Reference to xref:ROOT:index.adoc#_resources[Resources]

Includes

Include Documents
  • 🟣 enum

  • πŸ”΄ final class

  • 🟒 class

  • 🟠 abstract class

  • βšͺ interface

include::ROOT:partial$java-type-legend.adoc[]
Include Content by Lines

Include Lines from 1 to 3:

  • 🟣 enum

  • πŸ”΄ final class

  • 🟒 class

Include Lines from 2 to the end of the document:

  • πŸ”΄ final class

  • 🟒 class

  • 🟠 abstract class

  • βšͺ interface

Include Lines from 1 to 3:

include::ROOT:partial$java-type-legend.adoc[lines=1..3]

Include Lines from 2 to the end of the document:

include::ROOT:partial$java-type-legend.adoc[lines=2..-1]
Include Content by Tagged Region

Include Tagged Region:

This is Tagged Region

You can tag a region:

// tag::example-tag[]
This is Tagged Region
// end::example-tag[]

And then include it:

Include Tagged Region:

include::index.adoc[tag=example-tag,indent=0]

Images

Inline Image

duke with paragraph

image:ROOT:duke.svg[]
with paragraph
Block Image
duke
Figure 1. Title

with paragraph

.Title
image::ROOT:duke.svg[align=left]
with paragraph
Resize Image
duke
image::ROOT:duke.svg[,200]
You can set the following attributes in the image: [Title,Width,Height]
Inline Image on the right

Paragraph on the left and duke

Paragraph on the left and image:ROOT:duke.svg[,200,,role=right]

Videos

YouTube Video
video::b-Cr0EWwaTk[youtube,width=640,height=360,align=left]
YouTube Video with Playback Time
video::b-Cr0EWwaTk[youtube,width=640,height=360,align=left,start=86,end=97]

Code

Inline Code

This is inline code

This is `+inline code+`
Code with Syntax Highlighting and Callouts
Title
public class Main { (1)
    public static void main(String[] args){ (2)
        System.out.println("Hello World!");
    }
}
1 Class
2 Method
.Title
[,java]
----
public class Main { // <1>
    public static void main(String[] args){ // <2>
        System.out.println("Hello World!");
    }
}
----
<1> Class
<2> Method
Syntax Highlighting → CLICK HERE
An alternative delimiter to four dashes (----) is four dots (....)

Callouts can be in different formats which depends on language:

  • // <1>

  • # <1>

  • ;; <1>

  • <!--<1>-->

Admonitions

Simple Admonitions
This is a note
This is a tip
This is a warning
This is something important
NOTE: This is a note

TIP: This is a tip

WARNING: This is a warning

IMPORTANT: This is something important
Complex Admonition
Title

This is admonition with complex content and a list:

  • one

  • two

  • three

[NOTE]
.Title
====
This is admonition with complex content and a list:

- one
- two
- three
====

Blocks

Collapsible Block

This is a collapsible block

.Collapsible Block
[%collapsible]
====
This is a collapsible block
====

When nesting a delimited block that uses the same structural container, it’s necessary to vary the length of the delimiter lines:

Click Me
Click Me Too

This is a collapsible block in another collapsible block

.Click Me
[%collapsible]
====
.Click Me Too
[%collapsible]
=====
This is a collapsible block in another collapsible block
=====
====
Blockquotes
I hold it that a little rebellion now and then is a good thing, and as necessary in the political world as storms in the physical.
— Thomas Jefferson
Papers of Thomas Jefferson: Volume 11

Dennis: Come and see the violence inherent in the system. Help! Help! I’m being repressed!

King Arthur: Bloody peasant!

Dennis: Oh, what a giveaway! Did you hear that? Did you hear that, eh? That’s what I’m on about! Did you see him repressing me? You saw him, Didn’t you?

— Monty Python and the Holy Grail
"I hold it that a little rebellion now and then is a good thing,
and as necessary in the political world as storms in the physical."
-- Thomas Jefferson, Papers of Thomas Jefferson: Volume 11

[quote,Monty Python and the Holy Grail]
____
Dennis: Come and see the violence inherent in the system. Help! Help! I'm being repressed!

King Arthur: Bloody peasant!

Dennis: Oh, what a giveaway! Did you hear that? Did you hear that, eh? That's what I'm on about! Did you see him repressing me? You saw him, Didn't you?
____
Thematic Break

Before


After

Before

'''

After

Lists

Unordered List
  • List item

    • Nested list item

      • Deeper nested list item

        ls -la "/home"
  • Another list item

    • Another nested list item

* List item
** Nested list item
*** Deeper nested list item
+
[,bash]
----
ls -la "/home"
----
* Another list item
** Another nested list item
Ordered List
  1. List item

    1. Nested list item

      1. Deeper nested list item

  2. Another list item

    1. Another nested list item

. List item
.. Nested list item
... Deeper nested list item
. Another list item
.. Another nested list item
Checklist
  • Checked

  • Also checked

  • Not checked

* [x] Checked
* [*] Also checked
* [ ] Not checked
Description List
First Term

The description can be placed on the same line as the term.

Second Term

Description of the second term. The description can also start on its own line.

First Term:: The description can be placed on the same line
as the term.
Second Term::
Description of the second term.
The description can also start on its own line.
Question and Answer List
  1. What is the answer?

    This is the answer.

  2. Are cameras allowed?

    Are backpacks allowed?

    No.

[qanda]
What is the answer?::
This is the answer.

Are cameras allowed?::
Are backpacks allowed?::
No.
Separate Two Lists
  1. Apples

  2. Oranges

  1. Cats

  2. Dogs

. Apples
. Oranges

[]
. Cats
. Dogs
Attach Block to an Ancestor List
Term

Description:

  1. Point 1

  2. Point 2

  3. Point 3

Some useful Tip

Another Description:

  1. Point 1

  2. Point 2

  3. Point 3

Term::
Description:
+
--
. Point 1
. Point 2
. Point 3
--
+
TIP: Some useful Tip
+
Another Description:
+
--
. Point 1
. Point 2
. Point 3
--

Tables

Table
Table 1. Title
Column 1 → Header Row Column 2 → Header Row

Cell in Column 1 → Row 1

Cell in Column 2 → Row 1

Cell in Column 1 → Row 2

Cell in Column 2 → Row 2

.Title
|===
|Column 1 -> Header Row |Column 2 -> Header Row

|Cell in Column 1 -> Row 1
|Cell in Column 2 -> Row 1

|Cell in Column 1 -> Row 2
|Cell in Column 2 -> Row 2
|===
Table with columns having different relative widths and containing AsciiDoc content
Modifier and Type Method Description

T

block()

Subscribe to this 🟠 Mono<T> and block indefinitely until a next signal is received. Returns that value, or null if the 🟠 Mono<T> completes empty.

Mono<Person> personMono = personRepository.getById(1);
Person person = personMono.block();
System.out.println(person);

Not recommended to use as it blocks indefinitely

[cols="1,3,4a"]
|===
| Modifier and Type | Method | Description

| `T`
| `block()`
| Subscribe to this `🟠 Mono<T>` and *block indefinitely* until a next signal is received. Returns that value, or `null` if the `🟠 Mono<T>` completes empty.
[,java]
----
Mono<Person> personMono = personRepository.getById(1);
Person person = personMono.block();
System.out.println(person);
----
[IMPORTANT]
====
Not recommended to use as it *blocks indefinitely*
====
|===

Attributes and Substitutions

Attribute Definition

You define attribute on the document header. The first empty line in the document marks the end of the header.

= Document Title
:url-home: https://javowiec.dev
Attribute Substitution

Check out DEV Cheat Sheets!

Check out {url-home}[DEV Cheat Sheets]!
Global Attributes → CLICK HERE

Macros

To use below macros you need to add :experimental: attribute on the document header.

= Document Title
:experimental:
Keyboard Macro
Shortcut Description

Ctrl+C

Copy

Ctrl+V

Paste

|===
|Shortcut |Description

|kbd:[Ctrl+C]
|Copy

|kbd:[Ctrl+V]
|Paste
|===
Button Macro

Press the OK button when you are finished

Press the btn:[OK] button when you are finished
Menu Macro

File  New  Project…​

File  Manage IDE Settings  Import Settings…​

menu:File[New > Project...]

"File > Manage IDE Settings > Import Settings..."