theia-ide / theia-asciidoc-extension

Asciidoctor extension for Theia
2 stars 6 forks source link

Support the asciidoctor-diagram extension #10

Open hallvard opened 5 years ago

hallvard commented 5 years ago

Asciidoctor supports diagrams using the block syntax, e.g. [plantuml] .... here is the PlantUML diagram code .... But this is not supported by the asciidoctor extension's backend.

If you install the asciidoctor-diagram extension in the docker file using "gem install asciidoctor-diagram" and use the require option (-r): -r asciidoctor-diagram in the shell call, diagram images should be generated (in the same folder as html file) and could be served by the backend.

hallvard commented 5 years ago

I've verified that if I use "gem install asciidoctor" and run asciidoctor with the -r asciidoctor-diagram option in the gitpod/Theia terminal, diagrams are rendered.

hallvard commented 5 years ago

Note that the rendering slows down considerably, so it may be nice to turn the -r option off, or have a button on the preview for explicitly requesting a full render with diagram.