package theme
- Alphabetic
- Public
- All
Type Members
-
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.
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).
-
class
ThemeBuilder[F[_]] extends AnyRef
Builder API for constructing
Theme
instances, providing several shortcuts for defining the contents of a theme.Builder API for constructing
Theme
instances, providing several shortcuts for defining the contents of a theme. A theme can consist of inputs like templates, CSS or JavaScript files and optionally of one or more extension bundles for customizing Laika with features like directives or parser extensions.The API is entirely optional and can be used to avoid boilerplate when implementing a laika.theme.ThemeProvider.
-
trait
ThemeProvider extends AnyRef
Responsible for building a theme resource with the user-provided effect type and runtime configuration.
Responsible for building a theme resource with the user-provided effect type and runtime configuration.
Implementations of this trait can be passed to the
withTheme
method of the parser, renderer and transformer APIs of thelaika-io
module. Theme authors would usually offer a theme-specific configuration API with a finalbuild
method that provides aThemeProvider
for the user. -
abstract
class
TreeProcessorBuilder[F[_]] extends TreeMapperOps[F]
Provides several shortcuts for constructing a
TreeProcessor
(which is just a type alias for a plainKleisli
).
Value Members
-
object
Theme
Theme companion for constructing empty theme instances.
-
object
ThemeBuilder
ThemeBuilder companion that acts as an entry point for its API.
-
object
TreeProcessorBuilder
Entry point for the TreeProcessorBuilder API.