Asciidoctor Kroki Extension
An extension for Asciidoctor.js and Asciidoctor to convert diagrams to images using Kroki.
Documentation
Full documentation is available at https://docs.asciidoctor.org/kroki-extension/latest.
Quick start
Install the dependencies:
npm i asciidoctor asciidoctor-kroki
Register and use the extension:
import { convert, Extensions } from '@asciidoctor/core'
import asciidoctorKroki from 'asciidoctor-kroki'
asciidoctorKroki.register(Extensions)
console.log(await convert('[graphviz]\n....\ndigraph G { Hello->World }\n....'))
For installation instructions for Node.js, Browser, Ruby, and Antora, as well as the full configuration reference, see the documentation.
Contributing
Setup
To build this project, you will need the latest active LTS of Node.js.
We recommend volta to manage multiple active Node.js versions.
Building
Install the dependencies:
npm i
Build the project:
npm run build
When working on a new feature or when fixing a bug, make sure to run the formatter, the linter and the test suite:
npm run format
npm run lint
npm run test