Skip to content

SBuild-org/sbuild-jbake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SBuild JBake Plugin

This SBuild Plugin integrates JBake with SBuild.

Download

SBuild JBake Plugin can be downloaded from Maven Central.

To include it in you SBuild buildfile use the @classpath annotation:

@classpath("mvn:org.sbuild:org.sbuild.plugins.jbake:0.1.2")

Building from Source

You need a recent version of SBuild.

git clone https://github.com/SBuild-org/jbake.git
cd sbuild-sbuild-plugin/org.sbuild.plugins.jbake
sbuild all

You will find the built jar in the directory org.sbuild.plugins.jbake/target.

Requirements

This plugin requires at least SBuild 0.7.2.

Configuration

All configurable properties are documented via ScalaDoc. See file JBake.scala.

Targets

In it’s default configuration, this plugin will provide the following targets:

  • jbake - bake the site

  • serve-jbake - start a local web server on port 8820. This target will depend on the jbake target

  • init-jbake (optional) - create an initial JBake source directory layout with style, layout, and example files

If you create a named plugin instance, the generated targets are:

  • jbake-${name} - bake the site

  • serve-jbake-${name} - start a local web server on port 8820. This target will depend on the jbake-${name} target

  • init-jbake-${name} (optional) - create an initial JBake source directory layout with style, layout, and example files

Examples

Minimal example, which will generate a jbake site from src/jbake to target/jbake.

import de.tototec.sbuild._

@version("0.7.2")
@classpath("mvn:org.sbuild:org.sbuild.plugins.jbake:0.1.2")
class SBuild(implicit _project: Project) {

  Plugin[org.sbuild.plugins.jbake.JBake]

}

Another example, using JBake 2.2.1 to generate a site from src/website to target.

import de.tototec.sbuild._

@version("0.7.2")
@classpath("mvn:org.sbuild:org.sbuild.plugins.jbake:0.1.2")
class SBuild(implicit _project: Project) {

  import org.sbuild.plugins.jbake._
  Plugin[JBake] configure { _.copy(
    jbakeVersion = JBakeVersion.Packaged("2.2.1"),
    sourceDir = Path("src/website"),
    targetDir = Path("target")
  )}

}

Changelog

SBuild JBake Plugin 0.1.3 - not released yet

  • Evaluate return code of jbake process and fail the task accordingly.

SBuild JBake Plugin 0.1.2 - 2014-02-04

  • Added optional "init-jbake" target to create the initial project layout.

SBuild JBake Plugin 0.1.1 - 2014-01-28

  • Fixed JBake classpath resolution from ZIP files (wrong regex).

  • Added JBakeVersion.Classpath to allow customized JBake runtimes.

  • Added convenient contructor method for JBakeVersion.Packaged supporting the typical use case: downloading and using JBake from http://jbake.org.

SBuild JBake Plugin 0.1.0 - 2014-01-24

  • Initial Release, compatible to SBuild 0.7.1.9000 (unreleased)

About

SBuild Plugin that integrates the JBake static site generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages