Parses YAML content for each input document and stores the result in it's metadata.
- Namespace
- Statiq
.Yaml - Interfaces
- Base Types
-
- object
- Module
- ParallelSyncModule
graph BT
Type-->Base0["ParallelSyncModule"]
click Base0 "/api/Statiq.Common/ParallelSyncModule"
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["ParseYaml"]
class Type type-node
Syntax
public class ParseYaml : ParallelSyncModule, IModule, IParallelModule
Remarks
Parses the content for each input document and then stores a dynamic object
representing the first YAML document in metadata with the specified key. If no key is specified,
then the dynamic object is not added. You can also flatten the YAML to add top-level pairs directly
to the document metadata.
Constructors
Name | Summary |
---|---|
ParseYaml |
The content of the input document is parsed as YAML. All root-level scalars are added to the input document's metadata. Any more complex YAML structures are ignored. This is best for simple key-value YAML documents. |
ParseYaml |
The content of the input document is parsed as YAML. A dynamic object representing the first YAML document is set as the value for the given metadata key. See YamlDotNet.Dynamic for more details about the dynamic YAML object. If flatten is true, all root-level scalars are also added to the input document's metadata. |
Properties
Name | Property Type | Summary |
---|---|---|
Parallel | bool |
Indicates whether documents will be
processed by this module in parallel.
Inherited from ParallelSyncModule
|
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
|
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 ParallelSyncModule
|
ExecuteInput |
IEnumerable |
|
ExecuteInputAsync |
Task |
Executes the module.
Inherited from ParallelSyncModule
|
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
|