Sets the document destination.
- Namespace
- Statiq
.Core - Interfaces
- Base Types
-
- object
- Module
- ParallelConfigModule
<NormalizedPath>
graph BT
Type-->Base0["ParallelConfigModule<NormalizedPath>"]
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["SetDestination"]
class Type type-node
Syntax
public class SetDestination : ParallelConfigModule<NormalizedPath>, IModule, IParallelModule
Remarks
This module is typically used before
WriteFiles
to set the
Destination
prior to writing the document.
If an extension is provided, this module will change the extension of the
destination path for each input document.
If the metadata keys DestinationPath
, DestinationFileName
,
or DestinationExtension
are set (in that order of precedence), the value
will be used instead of the specified extension. For example, if you have a bunch
of Razor .cshtml files that need to be rendered to .html files but one of them
should be output as a .xml file instead, define the DestinationExtension
metadata value in the front matter of the page.
If a delegate is provided, it takes precedence over the metadata values (but can
use them if needed).
Constructors
Name | Summary |
---|---|
SetDestination |
Sets the destination of input documents according to the metadata values for
DestinationPath , DestinationFileName , or DestinationExtension
(in that order of precedence). If none of those metadata values are set, the
destination will remain unchanged.
|
SetDestination |
Changes the destination extension of input documents to the default page extension
defined in the setting PageFileExtensions (which defaults to ".html").
If DestinationPath , DestinationFileName , or DestinationExtension
metadata values are set, those will take precedence.
|
SetDestination |
Changes the destination of input documents to that of the delegate. |
SetDestination |
Changes the destination extension of input documents to the specified extension.
If DestinationPath , DestinationFileName , or DestinationExtension
metadata values are set, those will take precedence.
|
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
|
ExecuteConfigAsync |
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
|
Get |
NormalizedPath |
static
|