Parses, compiles, and renders Scriban and Liquid templates.
- Namespace
- Statiq
.Scriban - Interfaces
- Base Types
-
- object
- Module
- ParallelModule
graph BT
Type-->Base0["ParallelModule"]
click Base0 "/api/Statiq.Common/ParallelModule"
Base0-->Base1["Module"]
click Base1 "/api/Statiq.Common/Module"
Base1-->Base2["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type-.->Interface1["IParallelModule"]
click Interface1 "/api/Statiq.Common/IParallelModule"
Type["RenderScriban"]
class Type type-node
Syntax
public class RenderScriban : ParallelModule, IModule, IParallelModule
Remarks
Scriban is a fast, powerful, safe and lightweight text templating language and engine for .NET, with a compatibility mode for parsing Liquid templates. See this guide for an introduction to Scriban. See this guide for an introduction to Liquid.
This module user Scriban to render Scriban and liquid templates.
Constructors
Name | Summary |
---|---|
RenderScriban |
Parses Scriban templates in each input document and outputs documents with rendered content. |
RenderScriban |
Parses Scriban templates in the metadata of each input document and outputs documents with metadata containing the rendered content. |
Properties
Name | Property Type | Summary |
---|---|---|
Parallel | bool |
Indicates whether documents will be
processed by this module in parallel.
Inherited from ParallelModule
|
Methods
Name | Return Value | Summary |
---|---|---|
AfterExecution |
void |
Called after each module execution.
Inherited from Module
|
AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
AsLiquid |
RenderScriban |
Specifies that templates should be treated as Liquid templates instead of Scriban.
Short for doing
WithLexerOptions(new LexerOptions { Mode = ScriptMode.Liquid }) .
|
BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
ExecuteAsync |
Task |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
|
ExecuteContextAsync |
Task |
Executes the module once for all input documents.
Inherited from ParallelModule
|
ExecuteInputAsync |
Task |
Executes the module.
|
Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
WithLexerOptions |
RenderScriban |
Specifies the options passed to the lexer.
|
WithMemberRenamer |
RenderScriban |
Specifies the member renamer used for renaming document metadata keys,
properties and methods when used in Scriban templates. The standard Scriban
member renamer will make a camel/pascalcase name changed by `_` and lowercase.
e.g `ThisIsAnExample` becomes `this_is_an_example`.
|
WithModel |
RenderScriban |
Specifies a model to use for each page based on the current input
document and context.
|
WithParserOptions |
RenderScriban |
Specifies the options used when parsing Scriban templates.
|