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

Juanpprieto/stable sitemap #2589

Merged
merged 16 commits into from
Oct 21, 2024
Merged

Juanpprieto/stable sitemap #2589

merged 16 commits into from
Oct 21, 2024

Conversation

juanpprieto
Copy link
Contributor

WHY are these changes introduced?

Closes https://github.com/orgs/Shopify/projects/5093/views/16?pane=issue&itemId=79743679 and https://github.com/orgs/Shopify/projects/5093/views/16?pane=issue&itemId=79604624

WHAT is this pull request doing?

  1. Stabilizes getSitemap and getSitemapIndex utilities
  2. Removes the sitemap example
  3. Implements the stable sitemap utilities in the skeleton template

HOW to test your changes?

Visit the /sitemap.xml route and nested sitemap urls

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added or updated the documentation

Copy link
Contributor

shopify bot commented Oct 4, 2024

Oxygen deployed a preview of your juanpprieto/stable-sitemap branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment October 21, 202411:31 PM
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment October 21, 202411:31 PM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment October 21, 202411:31 PM
classic-remix ✅ Successful (Logs) Preview deployment Inspect deployment October 21, 202411:31 PM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment October 21, 202411:31 PM

Learn more about Hydrogen's GitHub integration.

@juanpprieto juanpprieto marked this pull request as ready for review October 4, 2024 18:31
@juanpprieto juanpprieto self-assigned this Oct 4, 2024
Copy link

@jsaubry jsaubry left a comment

Choose a reason for hiding this comment

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

I didn't review the code, but 👍 for

  • Removing the example
  • Moving to '2024-10' rather than unstable
  • Updating the skeleton

Copy link

@jsaubry jsaubry left a comment

Choose a reason for hiding this comment

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

Looking at the deployments, the XML produced looks legit. However, I tried to follow a link from the metaObject page and got a 404 https://01j9cc8nc12y73gvtmjaar74p0-bdc62392032d96aafe24.myshopify.dev/custom_pages/mono-skis, is that expected?

@@ -9,6 +9,8 @@ const SITEMAP_PREFIX = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">`;
const SITEMAP_SUFFIX = `</urlset>`;

const SITEMAP_STOREFRONT_API_VERSION = '2024-10';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally this version should not be hardcoded and it should either:
Accepts and sfapiVersion or consume any version passed to our clients constructions via server.ts

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is going out with the 2024-10 release, as I understand it we will no longer need to provide the storefrontApiVersion override to the storefront.query call, so I'll remove this const and rebase this against #2570

@rbshop rbshop added the 2024.10 label Oct 18, 2024
@rbshop rbshop changed the base branch from main to hl-2024-10-sfapi October 18, 2024 12:09
Base automatically changed from hl-2024-10-sfapi to main October 21, 2024 20:15
@wizardlyhel wizardlyhel merged commit 809c9f3 into main Oct 21, 2024
12 checks passed
@wizardlyhel wizardlyhel deleted the juanpprieto/stable-sitemap branch October 21, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants