1. Install (swarmlab-adoc)

2. Create project

  • Open a console

mkdir mytest
cd mytest
swarmlab-adoc

3. Copy-Paste asciidoc source

copy-paste source
Paragraphs don't require any special markup in AsciiDoc.
A paragraph is just one or more lines of consecutive text.

To begin a new paragraph, separate it by at least one blank line.
Newlines within a paragraph are not displayed.
 A paragraph offset by at least one space becomes a literal paragraph.
 All lines in a literal paragraph must be adjacent.

 A literal paragraph is displayed as preformatted text.
 The text is shown in a fixed-width font.
 Spaces and newlines,
 like the ones in this sentence,
 are preserved.

NOTE: An admonition paragraph draws the reader's attention to
auxiliary information.
Its purpose is determined by the label
at the beginning of the paragraph.

Here are the other built-in admonition types:

TIP: Pro tip...

IMPORTANT: Don't forget...

WARNING: Watch out for...

CAUTION: Ensure that...

bold *constrained* & **un**constrained

italic _constrained_ & __un__constrained

bold italic *_constrained_* & **__un__**constrained

monospace `constrained` & ``un``constrained

monospace bold `*constrained*` & ``**un**``constrained

monospace italic `_constrained_` & ``__un__``constrained

monospace bold italic `*_constrained_*` & ``**__un__**``constrained


=== Level 2 Section Title

==== Level 3 Section Title

===== Level 4 Section Title

====== Level 5 Section Title


Rubies are red, +
Topazes are blue.

[%hardbreaks]
Ruby is red.



* Edgar Allen Poe
* Sheri S. Tepper
* Bill Bryson

Unordered, basic (alt)

- Edgar Allen Poe
- Sheri S. Tepper
- Bill Bryson

* [*] checked
* [x] also checked
* [ ] not checked
*     normal list item

https://asciidoctor.org - automatic!

https://asciidoctor.org[Asciidoctor]

https://github.com/asciidoctor[Asciidoctor @ *GitHub*]

image::sunset.jpg[]

image::sunset.jpg[Sunset]

.A mountain sunset
[#img-sunset]
[caption="Figure 1: ",link=https://www.flickr.com/photos/javh/5448336655]
image::sunset.jpg[Sunset,300,200]



video::video_file.mp4[]

video::video_file.mp4[width=640, start=60, end=140, options=autoplay]

=== The Greatest

Embedded Youtube video

video::axMLZZNINCU[youtube]

=== pipe de oro

Embedded Vimeo video

video::154836263[vimeo]

4. Run

run
  • Create a file.adoc in mytest directory

  • Paste code

cd mytest
swarmlab-adoc
swarmlab-adoc convert all *.adoc files recursiv in html5 and pdf
If you need to convert only one file
docker run --rm -v $(pwd):/documents/ registry.vlabs.uniwa.gr:5080/swarmlab-asciidoctor asciidoctor --safe -b html5  -a theme=flask -a toc2 -a toc-placement=right -o ./path/to/FILENAME.html   ./path/from/FILENAME.adoc

Please note, there is a . in ./path

5. Using a web browser

You can see the file rendered as HTML just by visiting it!

6. view result

view result

Paragraphs don’t require any special markup in AsciiDoc. A paragraph is just one or more lines of consecutive text.

To begin a new paragraph, separate it by at least one blank line. Newlines within a paragraph are not displayed. A paragraph offset by at least one space becomes a literal paragraph. All lines in a literal paragraph must be adjacent.

A literal paragraph is displayed as preformatted text.
The text is shown in a fixed-width font.
Spaces and newlines,
like the ones in this sentence,
are preserved.
An admonition paragraph draws the reader’s attention to auxiliary information. Its purpose is determined by the label at the beginning of the paragraph.

Here are the other built-in admonition types:

Pro tip…​
Don’t forget…​
Watch out for…​
Ensure that…​

bold constrained & unconstrained

italic constrained & unconstrained

bold italic constrained & unconstrained

monospace constrained & unconstrained

monospace bold constrained & unconstrained

monospace italic constrained & unconstrained

monospace bold italic constrained & unconstrained

6.1. Level 2 Section Title

6.1.1. Level 3 Section Title

Level 4 Section Title
Level 5 Section Title

Rubies are red,
Topazes are blue.

Ruby is red.

  • Edgar Allen Poe

  • Sheri S. Tepper

  • Bill Bryson

Unordered, basic (alt)

  • Edgar Allen Poe

  • Sheri S. Tepper

  • Bill Bryson

    • checked

    • also checked

    • not checked

    • normal list item

sunset
Sunset
Sunset
Figure 1: A mountain sunset

6.2. The Greatest

Embedded Youtube video

6.3. pipe de oro

Embedded Vimeo video




Reminder

Caminante, no hay camino,
se hace camino al andar.

Wanderer, there is no path,
the path is made by walking.

Antonio Machado Campos de Castilla