Skip to content

fix: sitemap issues and deduplicate#17639

Merged
wackerow merged 4 commits into
ethereum:devfrom
flatsponge:dev
Mar 11, 2026
Merged

fix: sitemap issues and deduplicate#17639
wackerow merged 4 commits into
ethereum:devfrom
flatsponge:dev

Conversation

@flatsponge
Copy link
Copy Markdown
Contributor

Summary

Fix sitemap so search engines and AI agents can reliably consume
https://ethereum.org/sitemap.xml again.
Closes #17260

What changed

  • Restored homepage inclusion in sitemap (/ for default locale).
  • Added dynamic /developers/tools/[category]/ routes to sitemap generation (all 7 category
    pages).
  • Removed unreliable sitemap fields:
    • lastModified (previously deploy-time for every URL)
    • changeFrequency
    • priority
  • Added sitemap hreflang alternates via alternates.languages, including x-default.
  • Fixed translation namespace matching for /developers/tools/* to use the correct namespace
    (page-developers-tools).

Why

  • Homepage and live tools category pages were missing from sitemap output.
  • Uniform deploy-time lastModified made freshness metadata untrustworthy.
  • No sitemap hreflang alternates reduced multilingual discoverability.
  • Namespace fallback for tools routes could produce incorrect translated-locale detection.

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 23, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit bbcc554
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69b0b88eaac6300008c21ca7
😎 Deploy Preview https://deploy-preview-17639.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 60 (🟢 up 7 from production)
Accessibility: 94 (🟢 up 1 from production)
Best Practices: 100 (no change from production)
SEO: 99 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the tooling 🔧 Changes related to tooling of the project label Feb 23, 2026
@flatsponge flatsponge changed the title refactor: include dynamic developer tool pages in sitemap and dedupli… fix: sitemap issues and deduplicate Feb 23, 2026
Copy link
Copy Markdown
Collaborator

@myelinated-wackerow myelinated-wackerow left a comment

Choose a reason for hiding this comment

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

Well-researched PR that addresses all 5 issues from #17260. A few notes:

Build is failing — deploy preview didn't make it. Worth investigating before further review. Could be the new import of DEV_TOOL_CATEGORY_SLUG_LIST from the data-layer into translationRegistry.ts introducing a build-order or circular dependency issue.

hreflang locale filtering may be too restrictive: isLocaleValidISO639_1 filters the alternates list, but hreflang supports BCP 47 tags (e.g., zh-TW, pt-BR), not just ISO 639-1. Regional locales like zh-tw and pt-br would appear in sitemap URLs but be absent from the alternates.languages block. Worth confirming this is intentional.

The dedup approach is cleaner than the old hack — replacing the homepage-specific skip with a generic seenUrls Set is the right call. Removing the unreliable lastModified/priority/changeFrequency fields is also correct per Google's own docs.

Overlap note: PR #17563 addresses a subset of this (homepage only) with a simpler hardcoded approach. This PR supersedes it entirely if the build gets fixed.

Please fix the build and we can take another look.


🤖 Reviewed by Claude / claude-opus-4-6

@flatsponge
Copy link
Copy Markdown
Contributor Author

flatsponge commented Feb 24, 2026

should be fixed now! thank you for the quick review! :)

Copy link
Copy Markdown
Collaborator

@myelinated-wackerow myelinated-wackerow left a comment

Choose a reason for hiding this comment

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

Thanks @flatsponge! Appreciate the fixes.

Approving this PR. We've merged the latest dev into this branch -- just waiting on the Netlify build to confirm everything is still green before merging.

Verification against the deploy preview sitemap:

  • Homepage (/) is present with full hreflang alternates including x-default
  • All 7 /developers/tools/[category]/ pages are present with locale variants
  • hreflang alternates use proper BCP 47 tags (pt-br, zh-tw correctly included)
  • lastModified, changeFrequency, and priority fields are fully removed (Google ignores these anyway)
  • No duplicate /en/ root entry -- the seenUrls dedup works correctly
  • URL count is ~6,614 vs production's ~6,857 -- the decrease is expected from deduplication of default-locale entries

Architecture notes:

  • The shared src/data/developerTools.ts as single source of truth for category slugs is a clean refactor
  • The /developers/tools/ namespace mapping addition in translations.ts fixes locale detection for those routes
  • Removing the isLocaleValidISO639_1 filter from metadata.ts is correct -- hreflang supports BCP 47, not just ISO 639-1

This PR supersedes #17563 and #17567 -- both can be closed once this merges.


Reviewed by Claude / claude-opus-4-6

@wackerow wackerow merged commit 1baecf3 into ethereum:dev Mar 11, 2026
8 checks passed
@wackerow
Copy link
Copy Markdown
Member

@all-contributors add @flatsponge for code

@allcontributors
Copy link
Copy Markdown
Contributor

@wackerow

@flatsponge already contributed before to code

@wackerow wackerow mentioned this pull request Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling 🔧 Changes related to tooling of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sitemap missing homepage, 7 developer tools pages, and serving unreliable metadata

3 participants