Summary
Sets a title metadata key for documents based on their file path or source.
- Assembly
- Wyam
.Core .dll - Namespace
- Wyam
.Core .Modules .Metadata - Interfaces
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Wyam.Common.Modules/IModule"
Type["Title"]
class Type type-node
Syntax
public class Title : IModule
Remarks
This will split the title at special characters, capitalize first letters, remove extensions, etc.
Constructors
Name | Summary |
---|---|
Title |
This will use the existing title metadata key if one exists, otherwise it will set a title based on the document source or the RelativeFilePath key if no source is available. |
Title |
This sets the title of all input documents to a value from the delegate. |
Title |
This sets the title of all input documents to a value from the delegate. |
Title |
This sets the title of all input documents to the specified string. |
Methods
Name | Value | Summary |
---|---|---|
Execute |
IEnumerable |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
|
GetTitle |
string |
Gets a normalized title given a file path.
static
|
GetTitle |
Object |
Gets a normalized title given a document.
static
|
KeepExisting |
Title |
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 |
Title |
Specifies the key to set for the title. By default this module sets
a value for the key Title.
|