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

sitemap integration generates incorrect location path #10555

Closed
1 task
khalil-omer opened this issue Mar 25, 2024 · 0 comments · Fixed by #10557
Closed
1 task

sitemap integration generates incorrect location path #10555

khalil-omer opened this issue Mar 25, 2024 · 0 comments · Fixed by #10557
Labels
needs triage Issue needs to be triaged

Comments

@khalil-omer
Copy link

Astro Info

Astro                    v4.5.9
Node                     v18.19.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   static

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

If base is set in Astro config, as in this example, the sitemap will generate an incorrect path in sitemap-index.xml because the base will be needed if the base is actually used as part of the deployment.

What's the expected result?

Assuming a base of '/docs', the location of sitemap-0.xml should include this path.

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

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-zitxah?file=dist%2Fsitemap-index.xml

Participation

  • I am willing to submit a pull request for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant