GithubHelp home page GithubHelp logo

rodm / jbake-gradle-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbake-org/jbake-gradle-plugin

0.0 2.0 0.0 462 KB

A Gradle plugin for JBake

License: Other

Groovy 47.57% CSS 49.07% HTML 3.36%

jbake-gradle-plugin's Introduction

JBake plugin for Gradle

Build Status Coverage Status Apache License 2 download


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

plugins {
    id 'me.champeau.jbake' version '0.3.0-SNAPSHOT'
}

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

Warning
versions prior to 0.3.0 had a task named jbake. This task has been renamed to bake since 0.3.0.

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

Render Engine configuration

Jbake uses several engines. The library versions could be changed too:

jbake {
    pegdownVersion = '1.6.0'
    freemarkerVersion = '2.3.25-incubating'
    groovyTemplatesVersion = '2.4.7'
    jade4jVersion = '1.2.3'
    thymeleafVersion = '3.0.2.RELEASE'
    asciidoctorJavaIntegrationVersion = '0.1.4'
    asciidoctorjVersion = '1.5.4.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'
}

Repositories configuration

The plugin will automatically include jcenter() as a repository in order to resolve JBake and template engine dependencies. You may deactivate this feature by setting includeDefaultRepositories to false, like so

jbake {
   includeDefaultRepositories = false
}
Warning
You must still define at least one repository from where all JBake and template engine dependencies should be resolved. Failure to do so will result in a build error.

jbake-gradle-plugin's People

Contributors

aalmiray avatar ancho avatar danielkocot avatar jonbullock avatar melix avatar pledbrook avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.