Install

Works with Drupal: 8.x

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 55.65 KB
MD5: ee5f92542d833b39d37d83ee59e2c08a
SHA-1: 1013620688891a8abeb1bc4a842ff055d494db90
SHA-256: 40c3c36a33883ea0f9a00e2cffb59e412abc787540583f7eea9742ffac43d2fc
Download zip 89.14 KB
MD5: 6baace3a153e4a3330569f8406dfc74b
SHA-1: 9c3d1fb78d4693dd4f3258e8870b173650c828cd
SHA-256: c173a864fc6f7d4613eff316a53b20d474f51b041beb9185bad37578f12d9962

Release notes

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.

Read more about this release here.

Changes since 2.x

Features

#2924080: Use queue API for cron generation instead of batch API
#2961233: Allow for multiple sitemap types on one Drupal instance
#2959479: Make sitmemap structure pluggable
#2990905: Make sitemap types pluggable (plugins)
#2961236: Allow assigning any bundle to any sitemap variant via UI
#2968133: List all existing sitemap instances in the UI
#2990786: Allow defining sitemap variants through the UI
#2990770: Choose default sitemap variant in UI
#3002223: Make custom links compatible with variants

Improvements

#2961235: Store sitemap indexes in the database
#2930027: Sitemap chunks located in /sitemaps/ instead of webiste root
#3001969: Add weight to the simple sitemap field group
#3001388: Don't display messages on site-install
#3002227: Streamline API by using setVariants() in simple_sitemap.generator
#2974760: Child items in Menu are not generated in XML file
#2968979: Setting values programmatically does not reflect in form

Other

#3002208: Remove robotstxt module support
#2958710: Replace usages of the deprecated drupal_set_message() function
#3003785: Document new functionality of 3.x in README.md
#3000655: Fix tests for 3.x

Changes since last 3.x release candidate

#3018398: Fatal when upgrading from 8.2.12 when using webprofiler

API changes

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: 7 Dec 2018 at 09:26 UTC
Last updated: 9 Mar 2019 at 14:28 UTC
Bug fixes
New features
Unsupported

Other releases