feat: add per-page SEO meta tags and update sitemap - #445
Conversation
Add unique <PageTitle>, meta description, canonical URL, Open Graph, and Twitter Card tags to each page via <HeadContent>. Remove hardcoded per-page OG/Twitter/canonical from App.razor (keep shared defaults like og:image). Add /frameworks and /trending to sitemap.xml. Also update AGENTS.md with guidelines for adding new pages: SEO checklist, IL trimming compatibility, Playwright test requirements, static asset references, Blazor SSR+WASM patterns, and Sentry observability conventions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b71ce51 to
a59076c
Compare
There was a problem hiding this comment.
Pull request overview
This pull request enhances SEO by adding per-page meta tags, canonical URLs, and Open Graph/Twitter Card tags to each routable page (Home, Packages, Frameworks, Trending). It removes the hardcoded per-page meta tags from App.razor to avoid conflicts, updates the sitemap to include the /frameworks and /trending routes, and adds comprehensive documentation to AGENTS.md about SEO requirements, IL trimming considerations, Playwright testing patterns, and observability conventions for new pages.
Changes:
- Added per-page
<PageTitle>,<meta description>, canonical URLs, and Open Graph/Twitter meta tags via<HeadContent>to all routable pages - Removed hardcoded og:title, og:description, og:url, twitter:title, and twitter:description from App.razor (keeping shared defaults like og:image)
- Updated sitemap.xml with /frameworks and /trending routes
- Added detailed "Adding New Pages" guidelines to AGENTS.md covering SEO, IL trimming, Playwright tests, static assets, Blazor SSR+WASM patterns, and Sentry observability
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/NuGetTrends.Web/wwwroot/sitemap.xml | Added /frameworks and /trending routes with priority 0.8 |
| src/NuGetTrends.Web/Components/App.razor | Removed per-page OG/Twitter meta tags, kept shared defaults (og:image, twitter:image) with clarifying comments |
| src/NuGetTrends.Web.Client/Pages/Home.razor | Added HeadContent with page-specific meta description, canonical URL, Open Graph and Twitter Card tags |
| src/NuGetTrends.Web.Client/Pages/Packages.razor | Added HeadContent with page-specific meta description, canonical URL, Open Graph and Twitter Card tags |
| src/NuGetTrends.Web.Client/Pages/Frameworks.razor | Added HeadContent with page-specific meta description, canonical URL, Open Graph and Twitter Card tags |
| src/NuGetTrends.Web.Client/Pages/Trending.razor | Added HeadContent with page-specific meta description, canonical URL, Open Graph and Twitter Card tags |
| AGENTS.md | Added comprehensive "Adding New Pages" section with SEO, trimming, testing, and observability guidelines |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e health tests - Remove static <meta name="description"> from App.razor to avoid duplicates with per-page HeadContent tags - Add /packages and /trending to PageHealthTests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review comments addressed
All changes in commit 30b84bf. |
Summary
<PageTitle>,<meta description>, canonical URL, Open Graph, and Twitter Card tags to each page (/,/packages,/frameworks,/trending) via Blazor<HeadContent>App.razor(shared defaults likeog:imageremain)/frameworksand/trendingtositemap.xmlAGENTS.mdwith guidelines for adding new pages: SEO checklist, IL trimming compatibility, Playwright test requirements, static asset patterns, Blazor SSR+WASM considerations, and Sentry observability conventionsTest plan
<title>,<meta description>, and<link rel="canonical">in the HTML sourcesitemap.xmlincludes all four pages🤖 Generated with Claude Code