Repository navigation
[SEO T1.6] Arrête de faire crawler les redirections /joindin - #2468
Draft
xavierleune wants to merge 1 commit into
Draft
xavierleune wants to merge 1 commit into
xavierleune wants to merge 1 commit into
Conversation
Chaque page vidéo expose un lien interne /talks/{id}-{slug}/joindin qui
répond par une 302 vers joind.in : les robots suivent ainsi des centaines
de liens sans valeur. Les liens générés (fiche talk, widget programme du
blog, liste Algolia) portent désormais rel="nofollow" (ajouté à
"noopener" dans la liste JS), et robots.txt interdit /talks/*/joindin
pour tous les robots.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
L'audit relève 748 liens internes vers
/talks/{id}-{slug}/joindin. Chacun répond par une 302 vers joind.in, une sur chaque page vidéo. Les robots perdent du budget de crawl sur ces redirections sans valeur.Changements
templates/site/talks/show.html.twig: le lien « Fiche joind.in » du bloc Ressources porterel="nofollow". Le tableaulinksaccepte une clérelfacultative, passée au composantButtonvia:rel="link.rel ?? false"(un attributfalsen'est pas rendu, donc les autres liens restent inchangés).templates/blog/program.html.twig: le bouton « Commenter sur joind.in » du widget programme (route/blog/{eventSlug}/program,ProgramAction) porterel="nofollow".htdocs/js/talk/list.js: la fonctionlink()accepte unrelfacultatif (par défautnoopener). Le lien joind.in de la liste Algolia passenoopener nofollow; les liens slides et blog ne changent pas.htdocs/robots.txt: nouveau blocUser-agent: *avecDisallow: /talks/*/joindin, ajouté à la fin du fichier. Les blocs des robots IA ne changent pas.grep -rn joindin templates htdocs/js sourcesne trouve aucun autre lien public vers/joindin.templates/admin/talk/index.html.twigpointe vers l'URL joind.in, en back-office, hors périmètre.Tests
tests/behat/bootstrap/FeatureContext.php:all links with href containing "X" should have rel containing "Y". Il vérifie queYest l'un des jetons derel. Il échoue aussi quand aucun lien ne correspond, pour ne pas passer à vide (vérifié sur/talks/, qui n'a aucun lien de ce type : « No link with href containing "/joindin" was found »).tests/behat/features/PublicSite/Talks.feature:/talks/1-jouons-tous-ensemble-a-un-petit-jeu, tous les liens/joindinontnofollow;/robots.txtcontientUser-agent: *suivi deDisallow: /talks/*/joindin.robots.txtdemaster, les deux scénarios échouent (The link "/talks/1-jouons-tous-ensemble-a-un-petit-jeu/joindin" has rel "", which does not contain "nofollow"et directive absente). Avec la branche, ils passent.list.js: pas de scénario@javascript. Les identifiants Algolia de.envsont factices et le conteneur de test n'atteint pas Algolia, donc la liste ne renvoie aucun résultat en test. J'ai vérifié le JS avec un script Node jetable : il chargelist.jsavecinstantsearchsimulé, puis appelle le templateitemdes hits. Sur la branche,/talks/1-t/joindin => noopener nofollowethttps://s => noopener; surmaster,/talks/1-t/joindin => noopener.blog/program: pas couvert par Behat. Le bouton n'apparaît que pendant l'événement et jusqu'à 10 jours après.ProgramActionlit l'heure avecnew \DateTime()et non l'horloge Symfony, donc le stepthe current date isne l'atteint pas. Les événements de test sont soit dans 5 mois, soit en 2020. Le changement se limite à l'attribut ajouté dans le template.Points d'attention
robots.txt: T1.7 ajoute une ligneSitemap:dans le même fichier. Le conflit, s'il y en a un, se règle facilement : ce ticket n'ajoute que 3 lignes en fin de fichier.FeatureContext.php: le step ajouté sert à la vérification de ce ticket. Il est générique et réutilisable.ProgramActionutiliseClock/ClockInterface. Je ne l'ai pas fait : c'est hors du périmètre du ticket.🤖 Generated with Claude Code