A few of the sites that use the plugin and serve as a good example are:
This is work in progress
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.2.1'
}
}
apply plugin: 'me.champeau.jbake'
This will add a bake
task to your build, which will search for a standard JBake source tree in
src/jbake
and generate content into $buildDir/jbake
(typically build/jbake
).
The default input and output directories can be changed using the jbake
configuration block:
jbake {
srcDirName = 'jbake-sources'
destDirName = 'output'
}
The generated output can then be found at $buildDir/output
.
The Version could be changed too:
jbake {
version = '2.3.0'
}
The default is 2.3.2.
Jbake uses three engines. The library versions could be changed too:
jbake {
pegdownVersion = '1.4.2'
freemarkerVersion = '2.3.19'
asciidoctorJavaIntegrationVersion = '0.1.4'
asciidoctorjVersion = '1.5.1'
}
Notice the asciidoctorJavaIntegrationVersion
and asciidoctorjVersion
. Since Version 2.3.1 jbake has changed
to the asciidoctorj library.
This plugin handles this change internally. If you use a Version > 2.3.0 of jbake, the dependency switch to the new one.
There are several options to configure JBake. One is to have the regular jbake.properties
file
into the source directory. The other is to use the plugin configuration block:
jbake {
configuration['template.post.file'] = 'mypost.ftl'
}