-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-plugin-sitemap): create sitemap index #12239
feat(gatsby-plugin-sitemap): create sitemap index #12239
Conversation
@pieh I assigned you as reviewer 🙇 because github suggested that you reviewed these file recently... I did not know what to do after making PR ( assigned someone as reviewer by myself or just wait). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments. This looks pretty great. Big projects will benefit from this!
I also tested the plugin and works! |
Co-Authored-By: tomoyukikashiro <[email protected]>
@wardpeet Thanks for your review 👍 I have one question ! |
Works like a charm, thank you! |
Published in [email protected] |
}, | ||
} = queryRecords | ||
return new Promise(resolve => { | ||
// sitemapv-index.xml is default file name. (https://git.io/fhNgG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// sitemapv-index.xml is default file name. (https://git.io/fhNgG) | |
// sitemap-index.xml is default file name. (https://git.io/fhNgG) |
sitemapv-index
-> sitemap-index
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@muescha it's already merged, could you add a new pr? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok done -> #12512
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Now
gatsby-plugin-sitemap
can not create sitemap index.This PR allow us to create it by passing additional option to that plugin.
Also this plugin did not have any tests so I added them.
Related Issues
#12100
Details
Above is the minimal configuration to split large sitemap.
When number of URL in sitemap is more than 5000 plugin will create sitemap (e.g.
sitemap-0.xml
,sitemap-1.xml
) and index (e.g.sitemap.xml
) files.