laika.theme

package laika.theme

Type members

Classlikes

trait Theme[F[_]]

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).

Companion
object
object Theme

Theme companion for constructing empty theme instances.

Theme companion for constructing empty theme instances.

Companion
class
class ThemeBuilder[F[_]]

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.

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.

Companion
object
object ThemeBuilder

ThemeBuilder companion that acts as an entry point for its API.

ThemeBuilder companion that acts as an entry point for its API.

Companion
class

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 the laika-io module. Theme authors would usually offer a theme-specific configuration API with a final build method that provides a ThemeProvider 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 plain Kleisli).

Provides several shortcuts for constructing a TreeProcessor (which is just a type alias for a plain Kleisli).

Companion
object

Entry point for the TreeProcessorBuilder API.

Entry point for the TreeProcessorBuilder API.

Companion
class