Skip to content

Conversation

@gouravkhunger
Copy link
Contributor

@gouravkhunger gouravkhunger commented Apr 25, 2025

Changes

The sitemap plugin generates sitemap-${i}.xml and adds all those urls to sitemap-index.xml. It already supports customPages which are auto appended to the urls.

This PR introduces the customSitemaps option which appends external sitemaps to the sitemap-index.xml file along with the sitemap-${i}.xml entries.

Ability to add customSitemaps is important because in my case I host multiple services under the same domain proxied by nginx: example.com (made with astro), example.com/blog (made with ghost, etc.). So I need to be able to add example.com/blog/sitemap.xml to the default sitemap-index.xml file.

Testing

  • Added a test case to verify inclusion of custom sitemaps. Existing tests pass.
  • Also added a missing test for the already existing customPages options.

Docs

withastro/docs#11563

@changeset-bot
Copy link

changeset-bot bot commented Apr 25, 2025

🦋 Changeset detected

Latest commit: 05035f2

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Apr 25, 2025
@gouravkhunger

This comment was marked as off-topic.

@ematipico

This comment was marked as off-topic.

@gouravkhunger

This comment was marked as off-topic.

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @gouravkhunger

There are some things to address:

@gouravkhunger
Copy link
Contributor Author

gouravkhunger commented Jun 17, 2025

Hi @ematipico gentle nudge: this PR has been up for quite some time now. I had replied to your last review. maybe there was a misunderstanding on the scope of this PR. I'm happy to discuss. Thanks!

@ematipico ematipico self-assigned this Jul 25, 2025
@ascorbic ascorbic added this to the v5.13.0 milestone Jul 25, 2025
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

I just did a tiny bit of light editing to make it sound more like our typical style, but y'all should please correct if anything here is wrong or misleading!

Thanks for the great work providing extra information @gouravkhunger, and I'm making some similar style edits to the docs PR now! 🙌

Copy link
Contributor Author

@gouravkhunger gouravkhunger left a comment

Choose a reason for hiding this comment

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

Thank you so much @ematipico! Left a minor comment.

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Approving for docs! Thanks for contributing this helpful feature @gouravkhunger 🚀

@ematipico ematipico merged commit 5824b32 into withastro:main Aug 13, 2025
13 of 14 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Aug 13, 2025
@gouravkhunger gouravkhunger deleted the custom-sitemaps branch August 15, 2025 18:12
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Emanuele Stoppa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants