The sbt-site plugin has support for building Laika projects. To enable Laika site generation, simply enable the associated plugin in your
This plugin assumes you have a Laika project under the
src/laika directory. To change this, set the
sourceDirectory key in the
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:
- sbt 0.13
import LaikaKeys._ blockDirectives in Laika += CustomDirectives.postsToc siteRenderers in Laika += CustomDirectives.postsRenderer sourceDirectories in Laika := Seq((sourceDirectory in LaikaSite).value)
- sbt 1.x
laikaBlockDirectives in LaikaSite += CustomDirectives.postsToc laikaSiteRenderers in LaikaSite += CustomDirectives.postsRenderer