Skip to content

Latest commit

 

History

History
90 lines (65 loc) · 2.17 KB

README.adoc

File metadata and controls

90 lines (65 loc) · 2.17 KB

JBake plugin for Gradle Build Status

This plugin allows rendering a site using JBake directly from Gradle.

Examples

A few of the sites that use the plugin and serve as a good example are:

Usage

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).

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.3.0'
}

The default is 2.3.2.

Render Engine configuration

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.

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'
}