Install

Works with Drupal: 8.x

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 88.05 KB
MD5: 2a3bfabcc3006806cfcb856015beaa20
SHA-1: 7fbf1cf02725de29ceaa16715f3fa2477e67c4f9
SHA-256: 069ac5258f2f6cc4cdb330ed4efa5167a2359570db14371e2f588746446efae4
Download zip 138.33 KB
MD5: 6018fc8b100f052f4208c491bdcd8f47
SHA-1: 2f499e7133a2031f6372c2f3d12fbbb3a64120df
SHA-256: 0ad6cd7d83fbb413cc8d5b3d17944ccaccd9137f4915130137c9ca2b3a4df83d

Release notes

Changes since 3.1

New features

#3014649: Allow multiple variants to be set per bundle via UI
#3048969: Add image title and caption to XSL
#3043372: Add title and caption to sitemap images

Bug fixes

#3056495: Set current variant when getting menu_link_content instance settings
#3047704: Empty rows in XML for Menu Placeholder items
#3053171: Follow-up empty rows in XML for menu items
#3047300: Numeric value out of range: 1264 Out of range value

Improvements

#3057055: 'Regenerate sitemap after hitting save' generates default variant only
#3055038: Duplicate root paths not removed
#3057052: Use generated sitemap URLs on settings page
#3051700: Use core Url class to generate index page links
#3042597: Drupal 9 Deprecated Code Report

Changes since 2.x

Ability to create any type of sitemap via plugins

The 8.x-3.x release allows not only for customizing the URL generation through UrlGenerator plugins as 2.x does, but also creating multiple custom sitemap types through sitemapGenerator plugins and running all the sitemaps on the same Drupal instance. Now e.g a Google news sitemap can be added to a Drupal instance. This is possible through the new concept of sitemap variants.

Ability to create sitemap variants of various sitemap types via UI

Now e.g links form a specific entity bundle can be indexed in a specific sitemap variant with its own URL.

No more out of memory/time errors

The generation process has been streamlined to using a single queue regardless of whether batch generation is being used, or backend (cron/drush) processes. This should allow hundreds of thousands of entities/elements being indexed without memory errors.
If there is a problem, the generation process picks up from the last indexed element. The sitemap variants are only published after the generation has been completed.

Upgrade path from 2.x

There is an upgrade path from 8.x-2.x for regular users, however the API of the module has undergone several changes and custom code may need adjustments.

API changes since 3.1

None. Please make sure to use the below simple_sitemap.generator service API instead of accessing the module's configuration storage directly.

API methods

  • getSetting
  • saveSetting
  • setVariants
  • getSitemap
  • removeSitemap
  • generateSitemap
  • rebuildQueue
  • enableEntityType
  • disableEntityType
  • setBundleSettings
  • getBundleSettings
  • removeBundleSettings
  • setEntityInstanceSettings
  • getEntityInstanceSettings
  • removeEntityInstanceSettings
  • bundleIsIndexed
  • entityTypeIsEnabled
  • addCustomLink
  • getCustomLinks
  • removeCustomLinks
  • getSitemapManager
    • getSitemapVariants
    • addSitemapVariant
    • removeSitemapVariants
  • getQueueWorker
    • deleteQueue
    • rebuildQueue
    • getInitialElementCount
    • getQueuedElementCount
    • getStashedResultCount
    • getProcessedElementCount
    • generationInProgress

Hooks

  • hook_simple_sitemap_links_alter(&$links, $sitemap_variant)
  • hook_simple_sitemap_arbitrary_links_alter(&$arbitrary_links, $sitemap_variant)
  • hook_simple_sitemap_attributes_alter(&$attributes, $sitemap_variant)
  • hook_simple_sitemap_index_attributes_alter(&$index_attributes, $sitemap_variant)
  • hook_simple_sitemap_url_generators_alter(&$url_generators)
  • hook_simple_sitemap_sitemap_generators_alter(&$sitemap_generators)
  • hook_simple_sitemap_sitemap_types_alter(&$sitemap_types)

Check out this resource for more details about the module and in-depth tutorials.

Created by: gbyte
Created on: 28 May 2019 at 00:38 UTC
Last updated: 18 Jul 2019 at 22:28 UTC
Bug fixes
New features
Unsupported

Other releases