Sets a title metadata key for documents based on their file path or source.
- Namespace
- Statiq
.Core - 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["AddTitle"]
class Type type-node
Syntax
public class AddTitle : ParallelModule, IModule, IParallelModule
Remarks
This will split the title at special characters, capitalize first letters, remove extensions, etc.
Constructors
Name | Summary |
---|---|
AddTitle |
This will use the existing title metadata key if one exists, otherwise it will set a title based on the document source. |
AddTitle |
This sets the title of all input documents to a value from the delegate. |
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
|
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 |
|
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
|
KeepExisting |
AddTitle |
Indicates that an existing value in the title key should be kept. The
default value is
true . Setting to false will always
set the title metadata to the result of this module, even if the
result is null or empty.
|
WithKey |
AddTitle |
Specifies the key to set for the title. By default this module sets
a value for the key Title.
|