Install

Works with Drupal: ^8 || ^9

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 97.99 KB
MD5: fd34d20039754bb3b55d3324ae8d415d
SHA-1: 3603835323629e4e3ee621d5d45e1cff7a3a6719
SHA-256: 28ff2a632726d967e0500f84644c88ef9e1f9e79f83668eb9365dc317892e62b
Download zip 158.88 KB
MD5: 7aa1508070966544c9419c9d909a0678
SHA-1: 55252af261fbd7b18c230ab429eb7d8b92f4c66a
SHA-256: e8a9475017d4aebe72da81987353be5531c106eac9a96d364fcb64a02a59ac5b

Release notes

Changes since 3.7

New features

#3054239: Allow indexing a view display in multiple variants via UI

Bug fixes

#3156452: Updating bundle settings deletes all entity overrides
#3170261: Entity static cache can cause memory exhaustion during sitemap regeneration
#3153405: Removing pages at hook_simple_sitemap_links_alter doesn't update pagination
#3154570: Multilingual sites using alternate form of URL language negotiation are treated as monolingual
#3173530: Notice: Undefined index: #attributes in template_preprocess_fieldset() (line 217 of /var/www/domainname.dot/core/includes/form.inc)
#3178634: Sitemap generation broken on sites without language module installed
#3154494: Sitemap not displaying if site in subdirectory
Fixed tests not passing with non-standard route providers.

Improvements

#3180753: Improve performance when getting data of huge variant collection
#3162869: Skip redundant processing of forms
#3174809: Fix file permissions
#3181963: drupalPostForm is deprecated
#3181879: Replace ContentEntityBase with ContentEntityInterface in \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase

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: 12 Nov 2020 at 00:35 UTC
Last updated: 12 Nov 2020 at 00:35 UTC
Bug fixes
New features
Unsupported

Other releases