Skip to content

ancho/jbake-gradle-plugin

 
 

Repository files navigation

JBake plugin for Gradle Build Status

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

Examples

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

About

A Gradle plugin for JBake

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 100.0%