Asciidoctor
The sbt-site plugin has direct support for building Asciidoctor projects.
To enable the “sbt site Asciidoctor” plugin in your sbt project, add the following to your project/plugins.sbt
file:
addSbtPlugin("com.github.sbt" % "sbt-site-asciidoctor" % "1.5.0")
And enable the associated plugin in your build.sbt
file:
sourceenablePlugins(SitePreviewPlugin, AsciidoctorPlugin)
This assumes you have an Asciidoctor project under the src/asciidoctor
directory. To change this, set the sourceDirectory
key in the Asciidoctor
scope:
Asciidoctor / sourceDirectory := sourceDirectory.value / "asciimd"
Similarly, the output can be redirected to a subdirectory of target/site
via the siteSubdirName
key in Asciidoctor
scope:
source// Puts output in `target/site/asciimd`
Asciidoctor / siteSubdirName := "asciimd"
Attributes
Asciidoctor allows the rendering of documents to be inflenced by attributes.
You can configure attributes by setting asciidoctorAttributes
.
asciidoctorAttributes := Map(
"skip-front-matter" -> "", // attribute without value can be set to empty string
"lang" -> "nl" // attribute with value
)
1.5.0