Laika
The sbt-site plugin has support for building Laika projects.
Currently the Laika generator is only supported for sbt 0.13.
To enable Laika site generation, simply enable the associated plugin in your build.sbt
file:
enablePlugins(LaikaSitePlugin)
This plugin assumes you have a Laika project under the src/laika
directory. To change this, set the sourceDirectory
key in the LaikaSite
scope:
sourceDirectory in LaikaSite := sourceDirectory.value / "doc"
This plugin use Laika sbt plugin internally and redefine default values for several Laika sbt keys which related to sourceDirectory
in order to both work in harmony. Default setting of Laika sbt will be included automatically once you enable this plugin, you don’t need to include them manually and doing so may result in conflict.
From other hand you can customize other aspects of Laika’s behavior through basic Laika sbt plugin keys and hooks. For example in order to add custom block directives you can include such code to your build.sbt:
import LaikaKeys._
blockDirectives in Laika += CustomDirectives.postsToc
Full sample how use Laika sbt plugin together with sbt-site you can find here:
import LaikaKeys._
blockDirectives in Laika += CustomDirectives.postsToc
siteRenderers in Laika += CustomDirectives.postsRenderer
sourceDirectories in Laika := Seq((sourceDirectory in LaikaSite).value)