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

Manually create a sitemap.xml for docs SEO #4261

Merged
merged 16 commits into from
Nov 26, 2024

Conversation

DimedS
Copy link
Member

@DimedS DimedS commented Oct 28, 2024

Description

We initially tried using autogenerated robots.txt and sitemap.xml. However, the issue with this approach is that it does not support sub-projects (Viz and Datasets).

This PR reverts to using a manual robots.txt, with a link to a manually created sitemap.xml. Both files are now located in the extra_files folder, and this path has been included in the html_extra_path configuration in conf.py.

If this approach proves successful, the next step will be to completely deindex older docs versions using the method proposed by RTD: readthedocs/readthedocs.org#10648 (comment).

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]>
@DimedS DimedS linked an issue Oct 28, 2024 that may be closed by this pull request
Signed-off-by: Dmitry Sorokin <[email protected]>
docs/source/conf.py Outdated Show resolved Hide resolved
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
@DimedS
Copy link
Member Author

DimedS commented Nov 12, 2024

After adding html_extra_path = [str(here / "sitemap.xml")] to conf.py, I observed the following post-build:

I also tried adding a custom robots.txt, but the autogenerated version still appears at https://kedro--4261.org.readthedocs.build/robots.txt. This makes it difficult to verify the effect in this build, and it’s possible that the custom sitemap.xml and robots.txt will only take effect at a later stage, potentially being used at https://docs.kedro.org.

Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
@DimedS DimedS marked this pull request as ready for review November 25, 2024 13:45
@DimedS DimedS requested a review from yetudada as a code owner November 25, 2024 13:45
@DimedS DimedS requested a review from noklam November 25, 2024 13:50
docs/source/conf.py Outdated Show resolved Hide resolved
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.

💯

@astrojuanlu astrojuanlu mentioned this pull request Nov 26, 2024
9 tasks
Signed-off-by: Dmitry Sorokin <[email protected]>
@DimedS DimedS merged commit 9cbd2f7 into main Nov 26, 2024
10 checks passed
@DimedS DimedS deleted the 3741-manually-create-sitemap-for-docs branch November 26, 2024 10:23
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