Info
Version: | 2.1.3 |
Author(s): | Rob Engel - LiveOrDevTrying |
Last Update: | Friday, September 25, 2020 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/liveorDevTrying/sitemaps.net |
NuGet Url: | https://www.nuget.org/packages/SiteMaps.NET |
Install
Install-Package SiteMaps.NET
dotnet add package SiteMaps.NET
paket add SiteMaps.NET
SiteMaps.NET Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNetCore.Http.Abstractions(>= 2.0.0)
- Microsoft.AspNetCore.Mvc.Abstractions(>= 2.0.0)
- Microsoft.AspNetCore.Mvc.ViewFeatures(>= 2.0.0)
Tags
This package is designed to be very simple for simple use cases but allows for custom disallowed routes, user agents, and custom node endpoints by supplying optional parameters to the middleware extension methods. Sitemaps.xml asks if you would like to parse the controllers - you can add the [NoSiteMap] attribute to any class or method you would not like included in the Sitemap.xml and the [Priority] attribute to set custom priorities per route. You can provide detail routing information for a dynamic sitemap.xml of items, e.g. a link for each product in the products database.
The Robots middleware will allow you to add any number of RobotRules for defining your User-Agent and Disallowed routes. This middleware parses the existing controller structure and automatically includes all get endpoints in the dynamic Sitemap.xml while ignoring any Posts, Puts, or Deletes.