Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEX-101: Sitemap.xml improvements #237

Merged
merged 3 commits into from
Jul 30, 2024
Merged

NEX-101: Sitemap.xml improvements #237

merged 3 commits into from
Jul 30, 2024

Conversation

joshua-scott
Copy link
Member

@joshua-scott joshua-scott commented Jul 29, 2024

Similar idea and ticket as #236 but specifically for the sitemap. Decided to do this in a separate PR to keep things a bit more manageable. That one should be merged first, and then the diff for this PR will become smaller without the unrelated changes.

Link to ticket:

https://wunder.atlassian.net/browse/NEX-101 (ticket is about improving data fetching and error handling in general)

Link to feature environment:

https://feature-nex-101-sitemap-next.next-drupal-starterkit.dev.wdr.io/sitemap.xml

Changes proposed in this PR:

  • 5b6b2c6 is the only relevant commit here. Improvements:
  • Generate sitemaps for each locale in parallel rather than sequentially
  • Fetch each page in parallel rather than sequentially (except for the first page for each locale, as we need that to know how many pages to fetch)
  • Improved error messages if GET_SITEMAP_NODES graphql request fails
  • Sort resulting sitemap to make it easier to read through and reason about etc

How to test:

  1. Compare the current sitemap.xml against the new sitemap.xml

- Generate sitemaps for each locale in parallel rather than sequentially
- Fetch each page in parallel rather than sequentially (except for the first page for each locale, as we need that to know how many pages to fetch)
- Improved error messages if GET_SITEMAP_NODES graphql request fails
@joshua-scott joshua-scott marked this pull request as ready for review July 29, 2024 13:47
Copy link
Collaborator

@vermario vermario left a comment

Choose a reason for hiding this comment

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

seems like this can really help when there's a lot of content. Nice!

@vermario vermario merged commit b72e6da into main Jul 30, 2024
6 checks passed
@vermario vermario deleted the feature/NEX-101-sitemap branch July 30, 2024 10:49
jekku123 pushed a commit that referenced this pull request Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants