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

[ BUG ] Incorrect sitemap path in sitemap index #359

Closed
moonmeister opened this issue May 1, 2021 · 6 comments · Fixed by #360
Closed

[ BUG ] Incorrect sitemap path in sitemap index #359

moonmeister opened this issue May 1, 2021 · 6 comments · Fixed by #360

Comments

@moonmeister
Copy link

Describe the bug
when using simpleSitemapAndIndex I noticed in the sitemap-index.xml the paths to the sub index paths don't cotain the subfolder (destinationDir) in the path.

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.net/sitemap-0.xml</loc>
  </sitemap>
</sitemapindex>

Expected behavior
The location should contain the destination directory.

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.net/sitemap/sitemap-0.xml</loc>
  </sitemap>
</sitemapindex>

Context:

  • version: 6.3.0
@moonmeister
Copy link
Author

Affects gatsbyjs/gatsby#31167

@derduher
Copy link
Collaborator

derduher commented May 2, 2021

@moonmeister I'll be releasing a version shortly that has support for a publicBaseUrl so you can specify a non-root base url for sitemaps.

@moonmeister
Copy link
Author

This doesn't appear to be fixed.

@moonmeister
Copy link
Author

Well...now I'm just confused. So you added publicBasePath but destinatioDir already existed to do this...or is destination dir suppose to be something different?

@derduher
Copy link
Collaborator

derduher commented May 2, 2021 via email

@moonmeister
Copy link
Author

Okay, that makes sense now, maybe i missed some docs clarifying that but didn't realize that was the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants