asciidoctor / asciidoctor-lein-plugin

A Leiningen plugin for generating documentation using Asciidoctor
http://asciidoctor.github.io/asciidoctor-lein-plugin
Other
25 stars 1 forks source link

How to use asciidoctorj-diagram from within asciidoctor-lein-plugin? #3

Open muhuk opened 9 years ago

muhuk commented 9 years ago

Asciidoctor docs mention a -r parameter:

asciidoctor -r asciidoctor-diagram sample.adoc

But it doesn't seem to be supported by the leiningen plugin.

I'm trying to render the following snippet:

[graphviz, diagram-classes, png]
....
graph G {
  e
  subgraph clusterA {
    a -- b;
    subgraph clusterC {
      C -- D;
    }
  }
  subgraph clusterB {
    d -- f
  }
  d -- D
  e -- clusterB
  clusterC -- clusterB
}
....

(It's just one of the example, I'll tweak it later.)

Is there parameter or something that enables asciidoctorj-diagram?

mojavelinux commented 9 years ago

This was a new feature in 1.5.0, so there's a chance it hasn't made it to the lein plugin. I recommend aligning with the naming used by the Gradle plugin (the option name is requires). See https://github.com/asciidoctor/asciidoctor-gradle-plugin/blob/development/src/main/groovy/org/asciidoctor/gradle/AsciidoctorTask.groovy#L580.

We have talked about having a require API in AsciidoctorJ to simplify the step of requiring libraries. See https://github.com/asciidoctor/asciidoctorj/pull/254.