GenerateSitemap(Config<object>, Func<string, string>) Constructor
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.
Namespace
Statiq.Core
Containing Type
GenerateSitemap

Syntax

public GenerateSitemap(Config<object> sitemapItemOrLocation, Func<string, string> locationFormatter = null)

Parameters

Name Type Description
sitemapItemOrLocation Config<object> A delegate that either returns a SitemapItem instance or a string with the desired item location. If the delegate returns null, the input document is not added to the site map.
locationFormatter Func<string, string> A location formatter that will be applied to the location of each input after getting the value of the specified metadata key.