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.
Usage
-
Sitemap(DocumentConfig sitemapItemOrLocation, Func<string, string> locationFormatter = null)Creates a sitemap using the specified delegate which should return either a
stringthat contains the location for each input document or aSitemapIteminstance with the location and other information. If the delegate returnsnullor does not return the correct type of object, a link to the document will be used.sitemapItemOrLocationA delegate that either returns a
SitemapIteminstance or astringwith the desired item location. If the delegate returnsnull, the input document is not added to the sitemap.locationFormatterA location formatter that will be applied to the location of each input after getting the value of the specified metadata key.
-
Sitemap(Func<string, string> locationFormatter = null)Creates a sitemap using the metadata key
SitemapItemwhich should contain either astringthat contains the location for each input document or aSitemapIteminstance with the location and other information. If the keySitemapItemis not found or does not contain the correct type of object, a link to the document will be used.locationFormatterA location formatter that will be applied to the location of each input after getting the value of the
SitemapItemmetadata key.
-
Sitemap(string sitemapItemOrLocationMetadataKey, Func<string, string> locationFormatter = null)Creates a sitemap using the specified metadata key which should contain either a
stringthat contains the location for each input document or aSitemapIteminstance 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.sitemapItemOrLocationMetadataKeyA metadata key that contains either a
SitemapItemor astringlocation for each input document.locationFormatterA location formatter that will be applied to the location of each input after getting the value of the specified metadata key.
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.SitemapItem:Wyam.Common.Modules.Contents.SitemapItemContains a document-specific sitemap item for use when generating a sitemap.
