Asciidoctor Extensions
Asciidoctor Web PDF can use Asciidoctor extensions written in JavaScript from the CLI. For instance, if you want to use the Asciidoctor Kroki extension, you first need to install it:
npm i asciidoctor-kroki
Then, you can use the following command to load this extension:
asciidoctor-web-pdf --require asciidoctor-kroki document.adoc
It’s also possible to use an extension from a JavaScript file.
For instance, if you want to load a local extension declared in a JavaScript file named my-asciidoctor-extension.js, then you can use the following command:
asciidoctor-web-pdf --require ./my-asciidoctor-extension.js document.adoc
|
The extension should export a function named
|