Advanced Usage

Here are listed examples of a more advanced usage.

Running a Site Generator on Multiple Source Directories

If you need to run a generator on more than one source directory, bypassing the AutoPlugin system and defining one or more sbt Configurations is necessary. For example, suppose you have two Paradox source directories and want them each generated as a subdirectory under target/site. A build.sbt might look something like this:

source// Define two `Configuration` instances.
val Site1 = config("site1")
val Site2 = config("site2")

// Apply the default Paradox settings to the `Site1` config

// Customize the source directory
Site1 / paradox / sourceDirectory := sourceDirectory.value / "paradox-site-1"

// Customize the output subdirectory
Site1 / siteSubdirName := "chapter1"

// Same as above, but for config `Site2` keep the default source directory
Site2 / siteSubdirName := "chapter2"

// Global Paradox settings
paradoxTheme := Some(builtinParadoxTheme("generic"))

The other generators follow a similar pattern, e.g. JekyllPlugin.jekyllSettings(config("foo")).