Closed (fixed)
Project:
Simple XML sitemap
Version:
4.x-dev
Component:
Code: Search engine integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Dec 2021 at 15:35 UTC
Updated:
3 Mar 2022 at 22:19 UTC
Jump to comment: Most recent
Comments
Comment #2
gbyteComment #3
noda commentedHi. I wrote the referenced “unofficial post” about the Bing deprecation, and advocated for the adoption of IndexNow. I’d just like to add one comment regarding implementing the IndexNow in Drupal.
Please don’t hardcode a search engine to use with IndexNow. As stated on the IndexNow website, if you submit to URLs to one IndexNow-compatible search engines then that search engine will immediate forward it to other IndexNow-compatible search engines. So, Drupal can help maintain competition in the search engine market by not favoring any one search engine over another. If everyone submit their URLs to just Yandex or Bing it can skew the market, which is easily solved by picking a random provider from a list. E.g.
Ideally and to also future-proof things a bit, failed submission requests can be reattempted using a different entry from the list.
Oh, another implementation note that I jut ran into: Yandex’s API returns HTTP 202 Accepted instead of HTTP 200 OK as stated in its documentation.
Comment #4
gbyteHey @noda, thanks for your concerns. I just started working on integrating indexNow into simple_sitemap and in true Drupal fashion, we will be avoiding any hardcoding. Instead, we will be providing existing engines as configuration and a way to add new engines by the user. We will be also adding new engines for new module installations ourselves as soon as they start participating. I intend to add functionality where the user can choose the engine to submit to, but your idea to use randomness could be a good fallback!
Thanks for the illuminating blog post.
Comment #5
gbyteComment #6
gbyteHey, I need a second pair of eyes and hands on the indexNow functionality I implemented. Would you mind taking a look?
Aside from code and functionality checks, would you have time to add some JS to simple_sitemap_engines.fieldsetSummaries.js, so the Simple XML Sitemap tabs show the summary of indexNow in addition to the variant info?
Also I know it's a big ask, but in case you find the time (and motivation), we need test coverage for the engines module.
Note for the future me:
Apart from that we need a summary of settings set on the EntitiesForm and we need a status page showing the IndexNow compatible engines similar to the one showing regular engines (Drupal\simple_sitemap_engines\Controller\SearchEngineListBuilder).
Comment #8
walkingdexter commentedHi @gbyte, I added two commits to the issue fork, please review. Changes include code cleanup and handling of summary of IndexNow setting.
Also pay attention to the following points:
simple_sitemap_engineentity?Comment #9
gbyte@WalkingDexter Thanks!
I originally decided against it because of the confusion when loading specific entities for specific functionality. But you are right, there might be an engine supporting both (pinging and IndexNow) in which case we would have some redundancy. I changed it to a single entity type with two different fields and a couple of convenience methods.
The key can't go into vcs and the best way to store it is in production's settings file. But for the sake of accessibility, we need a facility to generate the key, so why not make the module instantly usable after generation. A power user can still change the key's storage by adding it to the settings.php file.
Agreed and changed.
I'm going to merge this tomorrow, feel free to review whenever.
Comment #10
walkingdexter commented@gbyte Just a note for code simplicity :)
can be replaced by
Comment #13
gbyte@WalkingDexter
Would creating 4.1.0 add a new release next to 4.0.1 on the release page? If so, I would prefer to create 4.0.2 after some testing of dev.
Comment #14
devad commentedIf the backwards compatibility is preserved and there are no changes related to core_version_requirement - the best is to go with 4.0.2. imho.
For example... when you drop the D8 support then 4.1.0 release makes sense.
Comment #15
gbyte@devad
AFAIK compatibility/API breakage is indicated by the first number '4'. The 1 indicates arbitrary big changes in functionality. Also I wouldn't signify dropping D8 support with a release, as it is not supported anymore anyway.
The question remains how drupal.org lists 4.1.x on the release page in relation to 4.0.x
Comment #16
devad commentedDisclaimer: I have a little maintainer's experience.... so I might be wrong. :)
In our case we have the the 4.x branch. And both 4.0.1 and 4.1.0 releases are releases of the same 4.x branch. So, I expect the 4.1.0 to replace 4.0.1 at the project page automatically. The similar example for this is the Admin Toolbar module.
If we would have 4.0.x and 4.1.x branches created separately... then both these branches and their releases would be displayed at the project page one above the other. The example for this is the Webform module.
Comment #17
walkingdexter commentedI agree with @devad. Releases are related to branches, so the new release should replace the current one.
https://www.drupal.org/node/1015226
https://semver.org
Based on the documentation, the release should be version 4.1.0.
Comment #18
gbyte@WalkingDexter You agree with me. That's what I wanted to do, just wanted to know how drupal.org would display the new release.
Thanks guys, make sure to test dev thoroughly.
Comment #19
walkingdexter commented@gbyte I think tests can be implemented within this issue #3105922: Fix tests for simple_sitemap_engines
Comment #20
gbyte@WalkingDexter Yep, feel free to grab it anytime. ;)
Comment #21
gbyte@devad
Well apparently that's not the case - minor releases create new entries on the project page. Only marking the previous release as unsupported hides it.
Comment #22
devad commentedThanks for the reply. It's good to know. It gives more flexibility to maintainers to hide or show the previous minor release which is good.
Comment #23
glardupThank you so much for implementing this so quickly!
I'm not sure I understand the procedure though. Is this how it's done?:
1. generate tag (through bing or throug the ui of the module)
2. ideally add the tag to settings.php
3. add a file called .txt containing the tag to the root folder (web) -> this one is unclear
Is the last step necessary? Does the file really have to go in the web folder, and not in the private one or so? If so, it would perhaps be a good idea to add this to the explanation in the message on the UI?
Comment #24
gbyte@GlarDup You are very welcome.
No need to add any files - a dynamic route is added as soon as a verification key is generated (or optionally added to settings.php). Basically if there are no warnings on the status page or on the module settings page, you are good. I'll see about adding even more instructions soon, but feel free to contribute documentation to the module.
Comment #25
glardupOh, even better! It seemed too easy to be true.
In that case perhaps a simple 'you're all set!' after the instructions would already suffice :-)
Thanks!
Comment #26
gbyteIt's supposed to be "simple" sitemap after all.
Which instructions are you referring to though?
Comment #27
glardupMission accomplished I'd say. :-)
The system message you get when generating a key. The one saying the key is now saved in Drupal State, but you should consider saving it in settings.php.
Comment #28
gbyteFor more info see the blog post about this feature.