Problem/Motivation
We have been working hard to implement the ping protocol as well as the new IndexNow protocol in simple_sitemap_engines (a submodule of simple_sitemap). These make sure to submit site changes directly to search engines for faster indexation. I believe users relying on the SEO tools recipe to configure their SEO are missing out on this crucial feature which is why I'm advocating to add it to the recipe.
Steps to reproduce
- Install Drupal CMS with SEO tools recipe
- Notice simple_sitemap_engines not being enabled
Proposed resolution
- Enable the simple_sitemap_engines module via the SEO Tools receipe
- Work is on its way to configure simple_sitemap on recipe install; let's configure the submodule accordingly: #3494070: Add Simple XML Sitemap defaults for content types, menu and vocabulary
User interface changes
Data model changes
Possible challenges
The IndexNow protocol which is in the process of replacing the ping protocol needs a verification key. The module provides a means of generating that key into state and informs about the possibility of converting it to a settings value. We may want to generate that key on module install - I can implement it upstream, or we do it in the recipe. Alternatively we don't do anything and leave it to the user (a warning about the missing key with a link is being displayed after module install).
I'm happy to work together with you on this. :)
| Comment | File | Size | Author |
|---|
Issue fork drupal_cms-3507179
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
phenaproximaComment #4
kunalgautam commentedComment #5
thejimbirch commented@kunalgautam
simple_sitemap_engines is a submodule of drupal/simple_sitemap.
This line in the composer.json file should be removed as it is not needed. The submodule gets required when drupal/simple_sitemap is required.
"drupal/simple_sitemap_engines": "^4.2.2",@gbyte How is the key generated, and how is it saved? I assume we can use config actions in a recipe to save it, but not sure how a recipe could generate the key.
Comment #6
gbyteAfter module installation
The IndexNow functionality is not available as long as the below requirement is not met.
Requirement warning
Another warning on the module's settings page
After key generation
Klicking 'Generate verification key' saves a new key to Drupal state. We generate the key through
\Drupal::service('uuid')->generate().A nudge to move the key to settings.php
After moving the key to settings.php
A nudge and facility to delete the key from state
I think this explains the process. I think the easiest and least invasive would be to generate the key and put it into state with
SimpleSitemapEnginesForm::generateKey()- a user's key in settings.php would override that automatically generated key anyway.The upside of an automatically generated key would be the user not needing to check requirements and pressing a button.
The downside being dev environments would start sending index requests to IndexNow.
If we go ahead with automatic generation, we have to decide if the upstream module should generate that key on module install or if Drupal CMS should do it.
What do you think?