Zonit.Extensions.Website.Sitemaps 10.0.0-preview.18

This is a prerelease version of Zonit.Extensions.Website.Sitemaps.
dotnet add package Zonit.Extensions.Website.Sitemaps --version 10.0.0-preview.18
                    
NuGet\Install-Package Zonit.Extensions.Website.Sitemaps -Version 10.0.0-preview.18
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zonit.Extensions.Website.Sitemaps" Version="10.0.0-preview.18" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zonit.Extensions.Website.Sitemaps" Version="10.0.0-preview.18" />
                    
Directory.Packages.props
<PackageReference Include="Zonit.Extensions.Website.Sitemaps" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zonit.Extensions.Website.Sitemaps --version 10.0.0-preview.18
                    
#r "nuget: Zonit.Extensions.Website.Sitemaps, 10.0.0-preview.18"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zonit.Extensions.Website.Sitemaps@10.0.0-preview.18
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zonit.Extensions.Website.Sitemaps&version=10.0.0-preview.18&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Zonit.Extensions.Website.Sitemaps&version=10.0.0-preview.18&prerelease
                    
Install as a Cake Tool

Zonit.Extensions.Website.Sitemaps

Sitemap generation for Zonit.Extensions.Website hosts. Plug-ins declare what to publish; the package owns everything that makes a sitemap valid.

Install

dotnet add package Zonit.Extensions.Website.Sitemaps
builder.Services.AddSitemap();

app.UseWebsite("/", o =>
{
    o.MapEndpoints(ep => ep.MapSitemap());
    o.Robots.Sitemap("/sitemap.xml");
});

Declare a source

internal sealed class NewsSitemap(IArticleRepository articles) : ISitemapSource
{
    public string Name => "news";

    public async IAsyncEnumerable<SitemapEntry> GetAsync(
        [EnumeratorCancellation] CancellationToken token)
    {
        await foreach (var a in articles.StreamPublishedAsync(token))
            yield return new SitemapEntry($"/news/{a.Slug}", LastModified: a.UpdatedAt);
    }
}

Registered by the area that owns the content, so installing a plug-in adds its URLs and removing it removes them — there is no list in the host to keep in step:

public void ConfigureServices(IServiceCollection services)
    => services.AddSitemapSource<NewsSitemap>();

What you get

Absolute URLs, the mount path base, expansion across every indexed culture with a full hreflang cluster, translated route segments and slugs, both protocol limits (50 000 URLs and 50 MB — the byte one binds first at twenty languages), splitting into numbered parts, the sitemap index, and an origin-keyed cache with stampede protection.

Sources stream: a table with two million rows is never materialised.

Documentation

Installing the package writes an AI-assistant guide into your repository's .claude / .cursor / .github surfaces. The same document is browsable at Instruction/extensions/sitemaps/sitemaps.md.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-preview.18 34 8/9/2026
10.0.0-preview.17 36 8/9/2026
10.0.0-preview.16 29 8/9/2026