Generates a site map from the input documents.
- 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["GenerateSitemap"]
class Type type-node
Syntax
public class GenerateSitemap : Module, IModule
Remarks
This module generates a site map from the input documents. The output document contains the site map XML as it's content.
You can supply a location for the each item in the site map as a
string
(with an optional function to format it
into an absolute HTML path) or you can supply a SitemapItem
for more control. You can also specify the
Hostname
metadata key (as a string
) for each input document, which will be prepended to all locations.
Constructors
Name | Summary |
---|---|
GenerateSitemap |
Creates a site map using the specified delegate which should return either a string that
contains the location for each input document or a SitemapItem instance with the location
and other information. If the delegate returns null or does not return the correct type of object,
a link to the document will be used.
|
GenerateSitemap |
Creates a site map using the metadata key SitemapItem which should contain either a string that
contains the location for each input document or a SitemapItem instance with the location
and other information. If the key SitemapItem is not found or does not contain the correct type of object,
a link to the document will be used.
|
GenerateSitemap |
Creates a site map using the specified metadata key which should contain either a string that
contains the location for each input document or a SitemapItem instance with the location
and other information. If the metadata key is not found or does not contain the correct type of object,
a link to the document will be used.
|
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 |
Executes the module once for all input documents.
|
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
|