SBuild JBake Plugin

An SBuild Plugin that integrates JBake static site generator.

License

License

GroupId

GroupId

org.sbuild
ArtifactId

ArtifactId

org.sbuild.plugins.jbake
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

SBuild JBake Plugin
An SBuild Plugin that integrates JBake static site generator.
Project URL

Project URL

https://github.com/SBuild-org/sbuild-jbake
Source Code Management

Source Code Management

https://github.com/SBuild-org/sbuild-jbake

Download org.sbuild.plugins.jbake

How to add to project

<!-- https://jarcasting.com/artifacts/org.sbuild/org.sbuild.plugins.jbake/ -->
<dependency>
    <groupId>org.sbuild</groupId>
    <artifactId>org.sbuild.plugins.jbake</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.sbuild/org.sbuild.plugins.jbake/
implementation 'org.sbuild:org.sbuild.plugins.jbake:0.1.2'
// https://jarcasting.com/artifacts/org.sbuild/org.sbuild.plugins.jbake/
implementation ("org.sbuild:org.sbuild.plugins.jbake:0.1.2")
'org.sbuild:org.sbuild.plugins.jbake:jar:0.1.2'
<dependency org="org.sbuild" name="org.sbuild.plugins.jbake" rev="0.1.2">
  <artifact name="org.sbuild.plugins.jbake" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.sbuild', module='org.sbuild.plugins.jbake', version='0.1.2')
)
libraryDependencies += "org.sbuild" % "org.sbuild.plugins.jbake" % "0.1.2"
[org.sbuild/org.sbuild.plugins.jbake "0.1.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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)

org.sbuild

SBuild

A magic-free yet powerful Scala-based build tool

Versions

Version
0.1.2
0.1.1
0.1.0