A long-lived project that still receives updates
An extension for Asciidoctor to convert diagrams to images using https://kroki.io
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 13.3.0
~> 3.13.1
~> 1.78

Runtime

 Project Readme

Asciidoctor Kroki Extension

Build JavaScript Build Ruby npm version Gem version Zulip Chat

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

  1. Install the dependencies:

    npm i
    
  2. 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