Diagrams

You can generate diagrams (PlantUML, Mermaid, Graphviz, and many others) directly from AsciiDoc source using the Kroki extension for Asciidoctor. It’s a separate package, not bundled with this converter, but no reveal.js-specific setup is needed — it produces a regular image, which this converter already knows how to render (including stretch and background image handling).

Ruby

Install the asciidoctor-kroki gem, then require it alongside this converter:

$ gem install asciidoctor-kroki
$ asciidoctor-revealjs -r asciidoctor-kroki presentation.adoc

Requiring the gem registers the extension globally, so any supported diagram type is available without further setup:

== Sequence Diagram

[plantuml,format=svg]
....
Alice -> Bob: Hello
Bob -> Alice: Hi
....

JavaScript

Install the asciidoctor-kroki npm package, then register it before converting:

$ npm install asciidoctor-kroki
import { Extensions, convertFile } from 'asciidoctor'
import kroki from 'asciidoctor-kroki'
import { register } from '@asciidoctor/reveal.js'

register()

const registry = Extensions.create() (1)
kroki.register(registry)

await convertFile('presentation.adoc', { backend: 'revealjs', extension_registry: registry }) (2)
1 Create a registry instance.
2 Pass it explicitly as extension_registry to the conversion call.

Read the Kroki extension documentation for the full list of supported diagram types and configuration options (e.g. pointing at a self-hosted Kroki server instead of the public kroki.io instance).