Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Request: Add a submodule which generates a "sitemap index" of all current sitemaps at /sitemap_index.xml
Appears there was some discussion about sitemap indexes in the past...
#327273: Multilingual support
#371756: <lastmod> tag doesn't get generate for all the site map chunks
...assume the use-case is mostly for multilingual sites, but there are certainly other reasons with the agnostic way multiple maps can be created.
Bonus request would be the ability to add a custom URL to the sitemap index list (for additional hard coded maps).
Comment | File | Size | Author |
---|---|---|---|
#6 | xmlsitemap-sitemap_index_submodule-1663384-6.patch | 8.98 KB | mithenks |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedThis module already creates a sitemap index named sitemap.xml depending on the number of links the site has. I'm not sure what benefit another module would be because a sitemap index should not contain a link to another sitemap index. I'm inclined to mark this as "won't fix" but I'll give you a chance to state your case further.
Comment #2
doublejosh CreditAttribution: doublejosh commentedJust misunderstood meaning. Referring to a "sitemap index" not a sitemap (as an index).
More details here: http://www.sitemaps.org/protocol.html#index
In my case I've used xmlsitemap_i18n to separate on language context, then need a sitemap index to refer to those sitemaps. Can certainly hardcode it, but would be a nice addition and would be nice to include the optional
<lastmod>
date as a dynamic entry.Comment #3
malc0mn CreditAttribution: malc0mn commentedJust to second doublejosh the functionality as described in http://www.sitemaps.org/protocol.html#index is really needed when using xmlsitemap_i18n
IMHO the http://yoursite.com/sitemap.xml should be a 'sitemap index' pointing to all the sitemaps defined in admin/config/search/xmlsitemap when using multiple sitemaps.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedSitemap indexes are used in xmlsitemap when more than one chunk file is created. I would like for Dave Reid to respond to this. We would need to include all sitemap index created by the user in our use of sitemap index. The file will still be named sitemap.xml and not sitemap_index.xml (the sitemaps.org reference is an example only).
Comment #5
doublejosh CreditAttribution: doublejosh commentedAhhh, I was unsure about the filename convention.
Separate/related issue...
Believe this index may be a need beyond language, but actually just found some Google documenation saying NOT to use multiple sitemaps.
#1670086: using rel="alternate" rather than multiple sitemaps by language context
Comment #6
mithenks CreditAttribution: mithenks at bmeme commentedIf for some reason anyone need this,
here is attached a possible implementation.
Regards,