cloudscribe.Web.SiteMap
8.4.0
Prefix Reserved
dotnet add package cloudscribe.Web.SiteMap --version 8.4.0
NuGet\Install-Package cloudscribe.Web.SiteMap -Version 8.4.0
<PackageReference Include="cloudscribe.Web.SiteMap" Version="8.4.0" />
<PackageVersion Include="cloudscribe.Web.SiteMap" Version="8.4.0" />
<PackageReference Include="cloudscribe.Web.SiteMap" />
paket add cloudscribe.Web.SiteMap --version 8.4.0
#r "nuget: cloudscribe.Web.SiteMap, 8.4.0"
#:package cloudscribe.Web.SiteMap@8.4.0
#addin nuget:?package=cloudscribe.Web.SiteMap&version=8.4.0
#tool nuget:?package=cloudscribe.Web.SiteMap&version=8.4.0
cloudscribe.Web.SiteMap
ASP.NET Core MVC controller and models for generating a SiteMap for search engines. Submitting a sitemap to the major search engines is vital to the SEO of most web sites.
This was implemented in support of my cloudscribe SimpleContent project but has no dependencies on other cloudscribe projects and could be useful for many website projects.
What is currently provided is an mvc controller at /api/sitemap that can generate the xml sitemap from 1 or more IEnumerable<ISiteMapNode>. To use it in your own project you would implement ISiteMapNodeService which has one method, GetSiteMapNodes which returns an IEnumerable<ISiteMapNode>. You can register one or more implementations of ISiteMapNodeService with DI services and the controller will iterate through each of them to build the sitemap. There is also support for memory caching, but support for distributed cache has not been implemented yet.
Note that this project does not currently provide a sitemap solution for very large sites. A single sitemap which this project can generate dynamically, can only have up to 25,000 urls. If you have more that that you would need a differenet solution that generates a sitemap index which is a list of sitemap urls where each of the separate sitemaps can have up to 25,000 urls, and you can have up to 50,000 sitemaps listed in the index. I think if I were needing sitemaps that large I would create a process to generate the files as static xml files and serve those directly rather than generating the sitemap dynamically as in this project.
Installation
Prerequisites:
To install from nuget.org open the project.json file of your web application and in the dependencies section add:
"cloudscribe.Web.SiteMap": "1.0.0-*"
Visual Studio 2015 should restore the package automatically, you could also open a command prompt and use dnu restore in your project folder.
In your Startup.cs you will need this at the top:
using Microsoft.Framework.DependencyInjection.Extensions;
using cloudscribe.Web.SiteMap;
and in ConfigureServices you will need this:
services.AddScoped<ISiteMapNodeService, YourImplementationOfSiteMapNodeService>();
You will also need to define a cache profile named SiteMapCacheProfile as part of the MVC configuration like this:
services.Configure<MvcOptions>(options =>
{
options.CacheProfiles.Add("SiteMapCacheProfile",
new CacheProfile
{
Duration = 6000 //in seconds
});
});
services.AddMvc();
Follow me on twitter @cloudscribeweb and @joeaudette
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on cloudscribe.Web.SiteMap:
Package | Downloads |
---|---|
cloudscribe.Web.SiteMap.FromNavigation
cloudscribe.Web.SiteMap.FromNavigation a library that implements ISiteMapNodeService using existing tree of nodes from cloudscribe.Web.Navigation.NavigationTreeBuilderService |
|
BioEngine.Core.Site
Package Description |
|
cloudscribe.SimpleContent.Web.Mvc
MVC Controllers for cloudscribe.SimpleContent.Web |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
8.4.0 | 0 | 8/21/2025 |
8.3.0 | 500 | 7/23/2025 |
8.2.0 | 589 | 7/9/2025 |
8.1.0 | 664 | 5/1/2025 |
8.0.0 | 2,595 | 8/5/2024 |
6.0.0 | 29,913 | 4/22/2022 |
5.0.0 | 11,476 | 11/26/2021 |
4.1.1 | 9,505 | 1/28/2021 |
4.1.0 | 33,074 | 8/14/2020 |
4.0.1 | 127,553 | 10/19/2019 |
4.0.0 | 20,021 | 9/28/2019 |
4.0.0-preview20190831 | 1,328 | 9/1/2019 |
3.0.0-preview20190831 | 798 | 8/31/2019 |
2.1.4 | 201,948 | 3/3/2019 |
2.1.3 | 10,080 | 2/15/2019 |
2.1.2 | 230,481 | 10/9/2018 |
2.1.1 | 35,768 | 8/26/2018 |
2.1.0 | 100,577 | 6/19/2018 |
2.0.1 | 38,897 | 11/30/2017 |
2.0.0 | 34,399 | 8/12/2017 |
2.0.0-preview20170725 | 4,555 | 7/31/2017 |
1.2.2 | 6,225 | 7/22/2017 |
1.2.1 | 12,415 | 5/10/2017 |
1.2.0 | 3,134 | 5/9/2017 |
1.1.20170509 | 2,771 | 5/9/2017 |
1.1.0-rc20170323 | 4,958 | 3/27/2017 |
1.1.0-rc20161127 | 6,535 | 11/28/2016 |
1.0.1-rc20161004 | 4,094 | 10/5/2016 |
1.0.1-rc20160914 | 3,501 | 9/14/2016 |
1.0.1-rc20160715 | 4,663 | 7/23/2016 |
1.0.1-rc20160628 | 3,899 | 6/28/2016 |
1.0.0-beta3 | 3,131 | 5/17/2016 |
1.0.0-beta2 | 1,730 | 4/20/2016 |
1.0.0-beta1 | 1,663 | 4/19/2016 |