Add URLs for Islandora objects to the XML sitemap module's database as custom links. When the XML sitemap module creates its sitemap it will include these custom links.
This module requires the following modules and library:
Install as usual, see this for further information.
Set 'Last Modified Solr Field' and 'Maximum number of Islandora links to process at once' in Administration » Islandora » XML Sitemap Integration (admin/islandora/xmlsitemap).
Admins can configure the number of pids to process plus the Solr field to sort on.
To remove or edit links you can manage them in the XML sitemap Custom Links tab (admin/config/search/xmlsitemap/custom).
We have also implemented a number of hooks to automatically add/remove links to objects, including:
Objects must be publicly (anonymously) available to be included in the XML Sitemap. Note that the listing of Custom Links in the Drupal XML Sitemap module does not necessarily equate to inclusion in the sitemap; an Islandora object may be listed in the Custom Links table (admin/config/search/xmlsitemap/custom) and still not be in the sitemap.xml file if the object is not publicly available. If Islandora objects are not appearing in the XML Sitemap, check the following:
- Ensure that the Islandora XML Sitemap and the Drupal XML Sitemap Custom Links modules are enabled.
- Ensure that the anonymous Drupal user has the "View repository objects" permission (admin/people/permissions).
- XACML permissions override the Drupal "View repository objects" permission. Make sure that there are no extra XACML permissions on the object.
Please also note that objects marked as "inactive", whether manually or by using the Simple Workflow module, will still be indexed by default.
Larger sites with greater than 100,000 objects may encounter issues during the sitemap building process with the default configuration, such as the process hanging around a specific number indefinitely or exiting the process entirely before completion. These users may want to try unchecking the "Prefetch URL aliases during sitemap generation" option found on the xmlsitemap admin configuration page (/admin/config/search/xmlsitemap/settings) and trying the process again.
Bulk generation using drush
There is a Drush command available for the generation of sitemap links. This command allows you to optionally fetch a limited amount of objects (
limit) similar to the hook_cron() and lets you define a custom amount to be fetched at once (
max_chunk_size) from SOLR.
drush islandora_xmlsitemap_generate [--max_chunk_size=100] [--limit=1000] [--regenerate]
max_chunk_sizedefaults to 100
- If no
limitis set all objects will be processed
--regenerateflag removes the "last_modified" value so will cause processing to start at the beginning. Use with caution if you have lots of objects.
This module's documentation is also available at our wiki.
Having problems or solved a problem? Check out the Islandora google groups for a solution.
If you would like to contribute to this module, please check out CONTRIBUTING.md. In addition, we have helpful Documentation for Developers info, as well as our Developers section on the Islandora.ca site.