Writing, creating, or drafting a new technical blog article in this Blazor project. Covers end-to-end workflow: choosing the URL, updating SiteMap.cs, updating sitemap.xml, creating Index.razor, and writing 1200-1800 word content.
You are writing a technical blog article for the TestArena Blazor project hosted at devcodex.in.
Before doing ANYTHING else, read copilot/blog-article.md in full using read_file. That file is the single source of truth for all formatting, structure, and placement rules. Follow every instruction in it exactly.
Execute these steps in order. Do not skip steps or reorder them.
Read copilot/blog-article.md. Internalize all rules before proceeding.
Read one of the following reference articles to understand the exact Razor component patterns used:
TestArena/Blog/Frontend/events-demo/Index.razorTestArena/Blog/AI/Bedrock/Index.razorTestArena/Blog/IntegrationTesting/ (any Index.razor in this folder)/blog/<category>/<article-slug>TestArena/Blog/:
React/, TDD/, AI/Bedrock/, Security/, SqlServer/ etc.Frontend/TestArena/Blog/<Category>/<SubFolder>/Index.razorRead TestArena/Blog/Common/NavigationUtils/SiteMap.cs to understand the existing PageInfo constructor pattern (title, relative path, date, image path, tags array). Add a new entry at the end of the Pages list following the exact same format.
Read wwwroot/sitemap.xml and add a <url> block for the new article at the end, using:
<loc>https://devcodex.in<article-url></loc><lastmod> set to today's date in YYYY-MM-DD format<changefreq>monthly</changefreq>Create TestArena/Blog/<Category>/<SubFolder>/Index.razor with:
Required structure (in this order):
@page "/blog/<category>/<slug>"@using statements:
@using TestArena.Blog.Common
@using TestArena.Blog
@using System.Linq
@using TestArena.Blog.Common.NavigationUtils
@code block:
@code {
PageInfo currentPage = SiteMap.Pages.FirstOrDefault(x => x.RelativePath == "/blog/<category>/<slug>")!;
}
<BlogContainer> wrapping all content<Header> bound to currentPage propertiesFollow the What / When / How format:
Content rules (non-negotiable):
<Section Heading="..." Level="4"> for top-level sections<Section Heading="..." Level="5"> for sub-sections<h1> <h2> <h3> tags — these are a bug<CodeSnippet Language="csharp"> (or appropriate language) for all multi-line code samples< as < and > as > inside code content<CalloutBox Type="info|warning|tip" Title="..."> for notes and callouts<BlogImage> or descriptive image placeholders where visuals help<EndNotes> if citing external sourcesAfter writing the article, perform a self-check:
SiteMap.cs has a new entry with matching RelativePathsitemap.xml has the new URL@page directive URL matches both of the above@code block RelativePath string matches @page<h1>–<h3> tags used anywhere<CodeSnippet> components with escaped < >