Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent indexing of old kedro docs using RTD-Enabled JavaScript script #4516

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DimedS
Copy link
Member

@DimedS DimedS commented Feb 24, 2025

Description

To address #3741, in collaboration with the Read the Docs (RTD) team, we have developed a JavaScript script that runs during every documentation build. This script injects a noindex meta tag into all documentation versions—except for the stable versions of Kedro and Kedro-Viz, and kedro-datasets-6.0.0 for Kedro-Datasets—to prevent outdated versions from being indexed by search engines.

Currently, the script is temporarily executed from this storage location, manually enabled by RTD.

Once this PR is merged and the next release is published, we will need to request RTD to manually enable script execution again. In the future, when RTD completes their planned feature update, script selection will be configurable directly from the RTD console.

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

Signed-off-by: Dmitry Sorokin <[email protected]>
Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DimedS 🙏🏼 What a journey...

We share the concern of having to keep track of versions manually in the script. For now unfortunately we'll have to move forward with what we have.

Also please ask some of our frontend colleagues to have a look at the JS 😄

@DimedS DimedS requested a review from jitu5 February 24, 2025 14:22
@jitu5
Copy link

jitu5 commented Feb 24, 2025

@DimedS In terms of code it looks good but considering the article posted by Nok readthedocs/readthedocs.org#10648 (comment) and Google's docs on use of noindex here https://developers.google.com/search/docs/crawling-indexing/block-indexing are still getting expected result ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve SEO and maintenance of documentation versions
3 participants