Install

Works with Drupal: ^8 || ^9

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 98.56 KB
MD5: 41484068f3d38336e54ea5c195b6ec61
SHA-1: 8f1cc9efc5c9a0f819bb622e04faa89a73b7df77
SHA-256: 758760b49674b32ed2c1b4cb7d3cbdd93d76a5eb193bb48ab584a37ad6c9faf4
Download zip 159.71 KB
MD5: d1a3002b12bfae5c2ee96cd4bb9a6b18
SHA-1: 4892f2196e35e6fc67f3da8748825815efe6462d
SHA-256: d20a329f6756e59c8e9cd782704db9f197acac7f7af40a97e6293677f71647ae

Release notes

Changes since 3.8

New features

The module should now be compatible with PHP 8.

Bug fixes

#3070132: Undefined index: changefreq Notice message
PHP 8: #3186997: PHP 8 TypeError: method_exists()

Improvements

#3118519: Move search engine last submitted timestamp away from configuration
#3194130: Lastmod not showing for homepage node
#3188229: Replace uses of REQUEST_TIME and time() with time service
#3195647: Fix recently failing tests

API changes

None.

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.

Other

  • Automatic submission to search engines
  • Views and views arguments support
  • XSL stylesheets for human visitors

Upgrade path from 2.x

The module can be easily upgraded from 8.x-2.x for regular users, however the API has undergone several changes and custom code may need adjustments.

API

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

  • getSetting
  • saveSetting
  • setVariants
  • getSitemap
  • removeSitemap
  • queue
  • rebuildQueue
  • generateSitemap
  • enableEntityType
  • disableEntityType
  • setBundleSettings
  • getBundleSettings
  • removeBundleSettings
  • setEntityInstanceSettings
  • getEntityInstanceSettings
  • removeEntityInstanceSettings
  • bundleIsIndexed
  • entityTypeIsEnabled
  • addCustomLink
  • getCustomLinks
  • removeCustomLinks
  • getSitemapManager
    • getSitemapVariants
    • addSitemapVariant
    • removeSitemapVariants
  • getQueueWorker
    • getInitialElementCount
    • getProcessedElementCount
    • generationInProgress
  • 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: 5 Mar 2021 at 22:48 UTC
Last updated: 5 Mar 2021 at 22:49 UTC
Bug fixes
New features
Unsupported

Other releases