Usage
-
FileName()Sets the metadata key
WriteFileNameto an optimized version ofSourceFileName. Also sets the metadata keyWritePathtoPath.Combine(RelativeFileDir, WriteFileName). -
FileName(DocumentConfig fileName)Sets the metadata key
WriteFileNameto an optimized version of the return value of the delegate. Also sets the metadata keyWritePathtoPath.Combine(RelativeFileDir, WriteFileName).fileNameA delegate that should return a
stringwith the filename to optimize.
-
FileName(DocumentConfig fileName, string outputKey)Sets the specified metadata key to an optimized version of the return value of the delegate. Does not automatically set the
WritePathmetadata key.fileNameA delegate that should return a
stringwith the filename to optimize.outputKeyThe metadata key to use for the optimized filename.
-
FileName(string inputKey)Sets the metadata key
WriteFileNameto an optimized version of the specified input metadata key. Also sets the metadata keyWritePathtoPath.Combine(RelativeFileDir, WriteFileName).inputKeyThe metadata key to use for the input filename.
-
FileName(string inputKey, string outputKey)Sets the specified metadata key to an optimized version of the specified input metadata key. Does not automatically set the
WritePathmetadata key.inputKeyThe metadata key to use for the input filename.
outputKeyThe metadata key to use for the optimized filename.
Fluent Methods
Chain these methods together after the constructor to modify behavior.
-
PreservePath(bool preservePath)Indicates whether to set the metadata key
WritePathtoPath.Combine(RelativeFileDir, WriteFileName).preservePathIf set to
true, theWritePathmetadata key is set.
-
PreservePath(string outputKey)Indicates whether to set the specified metadata key to
Path.Combine(RelativeFileDir, WriteFileName).outputKeyThe metadata key to set.
-
WithAllowedCharacters(IEnumerable<string> allowedCharacters)Specifies the characters to allow in the filename.
allowedCharactersThe allowed characters.
Input Metadata
The metadata values listed below apply to individual documents and are typically set from front matter (with just the name of the key) and used as inputs to the module to control behavior.
-
Keys.RelativeFileDir:Wyam.Common.IO.DirectoryPathThe path to the folder containing the file relative to the input folder.
-
Keys.SourceFileName:Wyam.Common.IO.FilePathThe file name of the original file with extension.
Output Metadata
The metadata values listed below apply to individual documents and are created and set by the module as indicated in their descriptions.
-
Keys.WriteFileName:Wyam.Common.IO.FilePathThe file name to use when writing the file.
-
Keys.WritePath:Wyam.Common.IO.FilePathThe path to use when writing the file.
