Hi Sean,
this is a nice idea.
I have bad news and good news for you. It is not possible with 2.4.0 of jbake. In this version it is not possible to configure options for asciidoctor.
But it will be possible with 2.5.0. See
https://github.com/jbake-org/jbake/pull/269.
I'll post an example on how to use asciidoctorj-diagram with the jbake gradle plugin.
Here is a short example of how to configure a gradle driven jbake project:
buildscript {
repositories {
maven { url "http://dl.bintray.com/calmdev/gradle-plugins" } //<1>
mavenLocal()
jcenter()
}
dependencies {
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.3.0-alpha.1' //<2>
classpath 'org.asciidoctor:asciidoctorj-diagram:1.5.0' //<3>
}
}
apply plugin: 'me.champeau.jbake'
repositories {
mavenLocal()
jcenter()
}
jbake{
version = "2.5.0-SNAPSHOT"
asciidoctorjVersion = "1.5.4.1"
configuration['site.host'] = "http://example.org"
configuration['render.tags'] = true
configuration['site.contextPath'] = "/blog"
configuration['asciidoctor.option.requires'] = "asciidoctor-diagram"
configuration['asciidoctor.attributes'] = [
"sourceDir=${projectDir}",
"imagesdir=${config.server.contextPath}img",
"imagesoutdir=${bake.input}/assets/img/diagrams",
"source-highlighter=highlight.js",
"icons=font"
]
}
That's very cool :)
You can set the gempath and use the upstream ruby version if you want to.
Hope that helps.