Running
Ornate is available in JCenter and Maven Central. The sbt plugin is published to the standard sbt plugin repository.
SBT Plugin
Ornate 0.6+ supports sbt 1.x. Older versions of Ornate support sbt 0.13.
First you need to add Ornate’s sbt plugin to project/plugins.sbt
:
A minimum project definition in build.sbt
which enables the plugin looks like this:
You can run Ornate from sbt with the ornate
task. By default it looks for a config file src/ornate.conf
, source and resources under src/doc
, and it builds the site to target/doc
. These settings can be changed directly through the sbt configuration:
Only the location of the config file is required. The base / source / resource / target directories are set by default, so they override any settings made in the config file. You can explicitly set them to None
to make the settings from the config file take effect instead.
Command Line
You need to get the Ornate core package and its dependencies in order to run Ornate from the command line:
Note: Ornate requires Scala 2.11
The main class for the command line launcher is com.novocode.ornate.Main
. The following arguments are supported:
[--base-dir=<path>]
: Source, resource and target dirs in the config are relative to the base directory. If not specified explicitly, this is the directory that contains the config file.[-D<option>=<value>...]
: Configuration options can be overridden with-D
arguments or through system properties.<config-file>
: The path to the site config file, typically namedornate.conf
.
All further configuration is done through the config file.
Cleaning
Cleaning the target directory is performed with a special theme, com.novocode.ornate.theme.Clean
. On the command line you can invoke it with -Dglobal.theme=clean
. Excluded resources can be configured:
When using the sbt plugin, the generated site is placed under target/doc
by default, so it can be deleted along with all other generated resources with sbt’s standard clean
task.