object Selections extends Serializable
Companion for creating selection config instances that can be passed to Laika configuration and builders that produce configuration of all possible combinations of @:select directives.
See the documentation for the @:select
directive in the manual for the full context of this feature.
- Alphabetic
- By Inheritance
- Selections
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(selection: SelectionConfig, selections: SelectionConfig*): Selections
Groups configuration for one or more @:select directives in an instance that can be passed to Laika configuration.
Groups configuration for one or more @:select directives in an instance that can be passed to Laika configuration.
Example for Laika's own manual, which allows the user to chose between seeing configuration examples for sbt or for the library API:
laikaConfig := LaikaConfig.defaults .withConfigValue(Selections( SelectionConfig("config", ChoiceConfig("sbt", "sbt Plugin"), ChoiceConfig("library", "Library API") ).withSeparateEbooks ))
See the documentation for the
@:select
directive in the manual for the full context of this feature. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
createCombinations(root: DocumentTreeRoot): ConfigResult[NonEmptyChain[(DocumentTreeRoot, Classifiers)]]
Creates all valid combinations of choices for the given configuration instance.
Creates all valid combinations of choices for the given configuration instance. The returned chain contains tuples that contain both, the modified document tree that can be passed to EPUB or PDF renderers to produce a specific version of the document tree only containing one set of selections and the classifiers that can be appended to the artifact name for distinction.
Concretely this means that you pass in a single document tree obtained from a parser that might contain one or more
@:select
directives for alternate content the user can choose from, and get back several new document trees where in each of them all but one of the choices have been removed from every@:select
directive. This is useful for e-book rendering where it is not desirable or possible to show the alternative content in interactive tabs. It is therefore used for EPUB and PDF rendering, but not for site generation.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.See the documentation for the
@:select
directive in the manual in this case for the full context of this feature. -
def
createCombinationsConfig(config: Config): ConfigResult[Seq[Seq[ChoiceConfig]]]
Creates all valid combinations of choices for the given configuration instance.
Creates all valid combinations of choices for the given configuration instance.
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.See the documentation for the
@:select
directive in the manual in this case for the full context of this feature.In contrast to the
createCombinations
method this one is mostly useful for features like generating a download page for all e-book artifacts produced by the renderer as it also contains the label information. - implicit val decoder: ConfigDecoder[Selections]
- val empty: Selections
- implicit val encoder: ConfigEncoder[Selections]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val key: DefaultKey[Selections]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated