JBake plugin for Gradle
Usage
plugins {
id 'org.xbib.gradle.plugin.jbake' version '1.2.1'
}
buildscript {
repositories {
jcenter()
maven {
url "http://xbib.org/repository"
}
}
dependencies {
classpath 'org.xbib.gradle.plugin:gradle-plugin-jbake:1.2.1'
}
}
apply plugin: 'org.xbib.gradle.plugin.jbake'
This will add a jbake
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
).
Configuration
Plugin configuration
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.5.0'
}
The default is 2.5.0.
Render Engine configuration
Jbake uses three engines. The library versions could be changed too:
jbake {
pegdownVersion = '1.6.0'
freemarkerVersion = '2.3.23'
asciidoctorjVersion = '1.5.4.1'
}
JBake configuration
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'
}
License
Apache License 2.0