Selections

laika.rewrite.nav.Selections
See theSelections companion object
case class Selections(selections: Seq[SelectionConfig])

Groups configuration for multiple @:select directives.

The @:select directive is a special directive that allows to create alternative versions of the same documentation, for example one with Scala code examples and one with Java. Or as in the case of Laika's own documentation, one showing configuration setup with sbt and the other through the library API.

When using the default Helium theme these alternatives will be rendered as tabs in the website.

While for EPUB and PDF output it triggers the generation of separate books for each of the alternatives and offers them on the download page to cater for the fact that tabs do not work well on paper.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Returns all classifiers of the configured selections based on their selection status.

Returns all classifiers of the configured selections based on their selection status.

This is a rather low-level method that you'd only need to use if you want to replicate the functionality that Laika's sbt plugin offers around producing different variants of the same documentation, based on the use of @:select directives in text markup.

For example, if you have one selection that offers code samples in Java or Scala, and another that offers build examples for sbt or Maven, then this method would return Seq("scala", "sbt") if scala and sbt are the selected choices in their respective groups in the current render operation.

The classifier is usually added to the artifact base name when Laika produces EPUB and PDF output for different selections. In the setup above, you would have four different EPUB files, [basename]-scala-maven.epub, [basename]-java-maven.epub, [basename]-scala-sbt.epub and [basename]-java-sbt.epub and also four PDF files with corresponding names.

Attributes

def getSelection(name: String): Option[SelectionConfig]

Returns the selection with the specified name, if present.

Returns the selection with the specified name, if present.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product