3827e374ca
TaxBaik CI/CD / build-and-deploy (push) Has been cancelled
Problem: - SitemapEndpoint (FastEndpoints) creates /api/sitemap.xml - robots.txt references /taxbaik/sitemap.xml - Path mismatch breaks search engine crawling Solution: - Restore Sitemap.cshtml (Razor Page) - Restore Sitemap.cshtml.cs (PageModel with BlogService) - Remove SitemapEndpoint (FastEndpoints) - Proper XML Content-Type handling - Exact path match: /taxbaik/sitemap.xml Why Razor Page? - Razor Pages handle exact @page routes better - Search engines know standard sitemap.xml paths - No /api prefix routing conflicts - Direct SSR rendering without endpoint routing Verification for Google/Naver: ✓ /taxbaik/sitemap.xml (exact match with robots.txt) ✓ Content-Type: application/xml ✓ Valid XML structure ✓ Dynamic blog posts included Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
15 lines
433 B
Plaintext
15 lines
433 B
Plaintext
@page "/sitemap.xml"
|
|
@model TaxBaik.Web.Pages.SitemapModel
|
|
@{
|
|
Response.ContentType = "application/xml; charset=utf-8";
|
|
}<?xml version="1.0" encoding="utf-8"?>
|
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
@foreach (var url in Model.Urls)
|
|
{
|
|
<url>
|
|
<loc>@System.Net.WebUtility.HtmlEncode(url)</loc>
|
|
<lastmod>@DateTime.UtcNow:yyyy-MM-dd</lastmod>
|
|
</url>
|
|
}
|
|
</urlset>
|