Asciinema

Asciinema provides a great way for sharing shell sessions recording, making documentation more lively !

Syntax example

Once you have created a .cast file, you can add it to your document with the following markup

--:----:--Keyboard shortcuts (?)Fullscreen (f)
Click to see the source code
[asciinema,rows=30,autoPlay=true]
....
include::image$bcd.cast[]
....
asciidoc

AutoPlay disabled

--:----:--Keyboard shortcuts (?)Fullscreen (f)
Click to see the source code
[asciinema,rows=10]
....
{"version": 2, "width": 80, "height": 24}
[1.0, "o", "hello "]
[2.0, "o", "world!"]
[3.0, "o", "Auto play is disabled"]
asciidoc

Mandatory setup

In bonita documentation site, the asciinema extension is already declared. So you can use the previous syntax without more configuration.

To be allowed to use the asciinema extension, you need to add the following configuration to your playbook:

antora:
  extensions:
    - require: '@springio/antora-extensions/asciinema-extension'
yml

This extension is available in the @springio/antora-extensions package.