===========================
BlazorSiteMapper is a sitemap generator for Blazor applications. It helps search engines understand the structure and update frequency of your site's pages.
- Easy integration with Blazor applications.
- Automatic sitemap generation.
- Supports setting change frequency and priority for each page.
Install Package
dotnet add package BlazorSiteMapper
Add the following using
to your Program.cs
using BlazorSiteMapper.Extensions;
Add the following to the Program.cs
builder.Services.RegisterSitemapper();
Add the following to the Program.cs
above your app.Run();
app.CreateSitemap();
Once that is done, you should be able to navigate to [your-domain]/sitemap.xml
and see a generated xml file with all pages you've annoted.
@page "/register"
@attribute [SitemapUrl("/register" changeFreq: ChangeFreq.Daily, priority: 1.0)]