trait Theme[F[_]] extends AnyRef
A theme is a way of pre-populating the input tree with a set of templates, styles and configurations to achieve a particular look & feel without the need for the user to craft their own templates, CSS or JavaScript.
Themes also allow the registration of extension bundles in case it offers custom directives, parser extensions or other customizations on top of its templates and styles.
Implementations of themes must provide an instance of the laika.theme.ThemeProvider trait to produce
instances of this trait.
The indirection is necessary as the concrete implementation of the F[_]
effect and the thread pools for
execution are meant to be chosen by the user.
Themes would also most likely come with a custom configuration API for tweaking the style and functionality of the theme. This is expected to be a type-safe Scala API as Laika avoids any kind of file-based, stringly configuration for global settings and only uses HOCON for local configuration (per-directory, per-document, per-directive).
- Alphabetic
- By Inheritance
- Theme
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
descriptor: ThemeDescriptor
A descriptor for this theme and its extensions for tooling or logging.
-
abstract
def
extensions: Seq[ExtensionBundle]
Installs one or more extension bundles into all parsers, renderers and transformers using this theme.
Installs one or more extension bundles into all parsers, renderers and transformers using this theme.
The extensions should be essential for the theme to function. If their features are rather opt-in in nature, it is best to offer the bundles separately and let the user choose if and where to use them.
-
abstract
def
inputs: InputTree[F]
The inputs to pre-populate when using parsers or transformers with this theme.
The inputs to pre-populate when using parsers or transformers with this theme.
For convenience, theme initialization code usually uses the laika.io.model.InputTreeBuilder API for assembling the inputs. The builder allows to collect inputs from the resource folder of the jar, from in-memory strings or streams or from document AST constructed on-the-fly, completely by-passing the parsing step.
It is not recommended to use the file-based options of the builder for themes, as this would limit the flexibility of the end-user.
-
abstract
def
treeProcessor: (Format) ⇒ TreeProcessor[F]
Hook for transforming the document AST between parsing and rendering.
Hook for transforming the document AST between parsing and rendering.
The provided function accepts a
Format
instance as parameter which can be used to provide different processor per output format.
Concrete 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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
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
-
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