While Wyam is certainly still usable, it's been rebranded and rebooted as Statiq with a ton of improvements. You almost certainly want to look there unless you're already a Wyam user.

Title Class


Sets a title metadata key for documents based on their file path or source.
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type["Title"] class Type type-node


public class Title : IModule


This will split the title at special characters, capitalize first letters, remove extensions, etc.


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(ContextConfig) This sets the title of all input documents to a value from the delegate.
Title(DocumentConfig) This sets the title of all input documents to a value from the delegate.
Title(string) This sets the title of all input documents to the specified string.


Name Value Summary
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
GetTitle(FilePath) string
Gets a normalized title given a file path.
GetTitle(IDocument, IExecutionContext) Object
Gets a normalized title given a document.
KeepExisting(bool) 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(string) Title
Specifies the key to set for the title. By default this module sets a value for the key Title.