Mirrors external
link
and script
resources locally.
- Namespace
- Statiq
.Core - Interfaces
- Base Types
-
- object
- Module
graph BT
Type-->Base0["Module"]
click Base0 "/api/Statiq.Common/Module"
Base0-->Base1["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type["MirrorResources"]
class Type type-node
Syntax
public class MirrorResources : Module, IModule
Remarks
For each input document, looks for link
and script
elements that link to external
resources and copies them locally, replacing the link
and script
links to the local path.
To prevent local mirroring for specific link
and script
elements, add a
data-no-mirror
attribute.
Note that because this module parses the document content as standards-compliant HTML and outputs the formatted post-parsed DOM, you should only place this module after all other template processing has been performed.
Constructors
Name | Summary |
---|---|
MirrorResources |
Mirrors external resources locally. By default, resources will be copied into the output folder
under the mirror directory.
|
MirrorResources |
Mirrors external resources locally, specifying the output location where they should be copied. |
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 |
|
ExecuteInputAsync |
Task |
Executes the module.
Inherited from Module
|
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
|