Indicates that this bundle deals with raw content embedded in text markup, like HTML.
Indicates that this bundle deals with raw content embedded in text markup, like HTML.
These kind of bundles are disabled by default as Laika is designed to render to multiple output formats from a single input document. With raw content embedded the markup document is tied to a specific output format.
Bundles which have this flag set to true need to be enabled explicitly by the user by calling
withRawContent
on the Parse
or Transform
API:
Transform.from(Markdown).to(HTML).withRawContent .fromFile("hello.md").toFile("hello.html")
Base configuration that serves as a fallback for configuration files in the source directories and/or config headers in markup and template documents.
Base configuration that serves as a fallback for configuration files in the source directories and/or config headers in markup and template documents.
The complete list of standard directives for block elements in markup documents.
The complete list of standard directives for block elements in markup documents.
Implementation of the fragment
directive for block elements in markup documents.
Implementation of the style
directive for block elements in markup documents.
Implementation of the toc
directive for block elements in markup documents.
Specifies the function to use for determining the document type of the input based on its path.
Specifies the function to use for determining the document type of the input based on its path.
Any path for which this function is not defined will be processed by the remaining
defined bundles. The documents for paths for which none of the extensions provides
a DocumentType
will be treated as static files to be copied over to the target
directory in transformations by default.
Implementation of the for
directive for block elements in markup documents.
Implementation of the for
directive for block elements in markup documents.
The content of such a block will only be rendered for the corresponding
output format (e.g. pdf
or html
).
Implementation of the pageBreak
directive.
Specifies extensions and/or replacements for parsers that deal with text markup, templates, CSS or configuration headers.
Specifies extensions and/or replacements for parsers that deal with text markup, templates, CSS or configuration headers.
Internal API usually only called by other extension bundles.
Internal API usually only called by other extension bundles.
In some cases a bundle might be an extension of another bundle and needs the opportunity to process and modify that bundle without requiring a direct reference to it. An example is a registry for directives which needs to pass all its registered directives to the bundle which deals with finally creating all the directive parsers.
The partial function should match only on the types of bundles it intends to process and is then allowed to return a new, modified instance of that bundle.
Specifies rewrite rules to be applied to the document tree model between the parse and render operations.
Specifies rewrite rules to be applied to the document tree model between the parse and render operations.
The specified functions will be invoked for each document, allowing to capture
information from the entire document tree before returning the actual rule,
which is a partial function from Element
to Option[Element]
that allows
to remove or replace elements from the tree.
The complete list of standard directives for span elements in markup documents.
The complete list of standard directives for span elements in markup documents.
Implementation of the style
directive for span elements in markup documents.
The complete list of standard directives for templates.
The complete list of standard directives for templates.
Implementation of the for
directive for templates.
Implementation of the fragment
directive for templates.
Implementation of the if
directive for templates.
Implementation of the toc
directive for templates.
The themes defined by this bundle, which are a collection of templates, styles and custom render functions.
The themes defined by this bundle, which are a collection of templates, styles and custom render functions.
A theme is always specific to a particular output format like HTML or PDF. A bundle can contain multiple themes for the same output format which will be merged before use.
Creates the nodes for a table of content.
Creates the nodes for a table of content.
the maximum depth to traverse when building the table, the depth is unlimited if the value is empty
the string identifier that specifies the tree that should serve as the root for the table
the title for the table
the cursor of the document the table of content will be placed in
a block element containing the table and its title
Indicates that this bundle should still be used if the user runs a transformation in strict mode.
Indicates that this bundle should still be used if the user runs a transformation in strict mode.
This setting is appropriate if a bundle contains features which are native elements of a text markup language as defined in its specification, but implemented as an extension for technical reasons.
Returns a new extension bundle by merging the content of this bundle with the content of the base bundle.
Returns a new extension bundle by merging the content of this bundle with the content of the base bundle.
The other bundle is treated as the base of this bundle, which means that:
- in case of optional features a feature defined in this bundle will overwrite a feature defined in the base
- in case of features applied in sequence, the features in this bundle will be applied before the features in the base bundle
- in case of feature collections, the features of this bundle will be merged with those of the base bundle
Provides the implementation for the standard directives included in Laika.
These include:
toc
: Generates a table of content from a specified root node.fragment
: Marks a block in a markup document as being separate from the main content, so that it can be placed separately in templates.for
: Accesses a value from the context and sets it as the reference context for its body elements, executing the body if the referenced value is non-empty and executing it multiple times when it is a collection.if
: Accesses a value from the context and processes the body element only when it is a value recognized as true.format
: Process the body element only when the output format matches the format specified in the directive (e.g.pdf
orhtml
).style
: Adds a style property to the body element.fragment
: Adds the body as a fragment to the target document, separate from the main content, to be rendered in different locations of the output, like headers, footers or sidebars.pageBreak
: Inserts a page break element into the tree (will only be rendered by page-based output, like XSL-FO or PDF.