Skip to content

Sitemap

Trevor Fayas edited this page Jan 1, 2022 · 2 revisions

You can modify the SitemapController.cs to adjust the sitemap generation. This uses the ISiteMapRepository.GetSiteMapUrlSetAsync function to allow you to decide what pages should be included in the sitemap.

Included in the default implementation are two types of sitemap items:

  1. Sitemap determined by the Navigation elements
  2. Sitemap urls of any Generic.BasicPage

With these you can see you can generate the sitemap just by finding a normal page (using it's normal Page Url) or find urls based on a field on the given found pages (such as navigation).

The routes for both /sitemap.xml and /googlesitemap.xml are both already defined in the RouteConfig.cs

Clone this wiki locally