setup-blazor-sitemaps

Installation
SKILL.md

Set up / configure sitemaps in Blazor

Target .NET 10 server-hosted Blazor. Use namespace PinguApps.BlazorSitemap. The package discovers compiled RouteAttribute metadata; it does not scan deployed Razor source or render pages. Standalone WebAssembly requires a hosting endpoint or deployment-generated sitemap. Server trimming/Native AOT is unsupported; normal Auto client trimming is supported.

Install and register

  • Server: PinguApps.BlazorSitemap. Its dependency brings Abstractions transitively.
  • Each referenced client/Razor library containing included routable components: explicitly reference PinguApps.BlazorSitemap.Abstractions for attributes and source-tracking assets. Do not require the server package in the browser.
  • Configure Sitemap:PublicBaseUrl using normal ASP.NET Core configuration. Prefer dotnet user-secrets init and dotnet user-secrets set "Sitemap:PublicBaseUrl" "http://localhost:5187" in the server project for Development. User Secrets are automatically loaded by WebApplication.CreateBuilder only in Development. Supply production settings through appsettings, environment variables (Sitemap__PublicBaseUrl) or deployment configuration. Command-line overrides also work.
  • Set the actual trusted public HTTP(S) origin and optional mount, never incoming Host headers. Credentials, query, fragment, whitespace and backslashes are invalid in the base.
Installs
1
GitHub Stars
1
First Seen
Oct 24, 2026