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.
- Namespace
- Statiq
.Core - Containing Type
- GenerateSitemap
Syntax
public GenerateSitemap(string sitemapItemOrLocationMetadataKey, Func<string, string> locationFormatter = null)
Parameters
Name | Type | Description |
---|---|---|
sitemapItemOrLocationMetadataKey | string | A metadata key that contains either a SitemapItem or
a string location for each input document. |
locationFormatter | Func |
A location formatter that will be applied to the location of each input after getting the value of the specified metadata key. |