Skip to content

feat: add per-page SEO meta tags and update sitemap - #445

Merged
bruno-garcia merged 2 commits into
mainfrom
feat/seo-meta-tags
Feb 14, 2026
Merged

feat: add per-page SEO meta tags and update sitemap#445
bruno-garcia merged 2 commits into
mainfrom
feat/seo-meta-tags

Conversation

@bruno-garcia

Copy link
Copy Markdown
Member

Summary

  • Add unique <PageTitle>, <meta description>, canonical URL, Open Graph, and Twitter Card tags to each page (/, /packages, /frameworks, /trending) via Blazor <HeadContent>
  • Remove hardcoded per-page OG/Twitter/canonical tags from App.razor (shared defaults like og:image remain)
  • Add /frameworks and /trending to sitemap.xml
  • Update AGENTS.md with guidelines for adding new pages: SEO checklist, IL trimming compatibility, Playwright test requirements, static asset patterns, Blazor SSR+WASM considerations, and Sentry observability conventions

Test plan

  • Verify each page renders correct <title>, <meta description>, and <link rel="canonical"> in the HTML source
  • Verify Open Graph and Twitter Card tags are page-specific (test with a social media debugger or view-source)
  • Confirm sitemap.xml includes all four pages
  • Run existing Playwright tests to ensure no regressions

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 14, 2026 15:35
Comment thread src/NuGetTrends.Web/Components/App.razor Outdated
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/NuGetTrends.Web.Client/Pages/Packages.razor
Comment thread src/NuGetTrends.Web.Client/Pages/Frameworks.razor
Comment thread src/NuGetTrends.Web.Client/Pages/Trending.razor
Comment thread AGENTS.md
Comment thread AGENTS.md
Comment thread src/NuGetTrends.Web.Client/Pages/Home.razor
…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>
@bruno-garcia

Copy link
Copy Markdown
Member Author

Review comments addressed

# Comment Author Verdict Action
1 Duplicate <meta name="description"> in App.razor won't be overridden by HeadContent sentry[bot] Accepted Removed static meta description from App.razor
2 Duplicate meta description on Home.razor Copilot Accepted Same fix — removed static default
3 Duplicate meta description on Packages.razor Copilot Accepted Same fix
4 Duplicate meta description on Frameworks.razor Copilot Accepted Same fix
5 Duplicate meta description on Trending.razor Copilot Accepted Same fix
6 Missing /packages and /trending in PageHealthTests Copilot Accepted Added both routes to PageHealthTests
7 AGENTS.md canonical URL text is inaccurate Copilot Rejected Text was already updated to reference <SeoHead> component; Copilot referenced stale content

All changes in commit 30b84bf.

@bruno-garcia
bruno-garcia merged commit 506881f into main Feb 14, 2026
4 checks passed
@bruno-garcia
bruno-garcia deleted the feat/seo-meta-tags branch February 14, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants