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 deprecated documentation from showing up in search engine top results #6160

Closed
awaelchli opened this issue Feb 23, 2021 · 14 comments
Closed
Assignees
Labels
docs Documentation related good first issue Good for newcomers let's do it! approved to implement
Milestone

Comments

@awaelchli
Copy link
Contributor

awaelchli commented Feb 23, 2021

📚 Documentation

Currently when we search keywords like "pytorch lightning trainer" we get results that point to very very very outdated docs!
It should instead point to the latest stable documentation pages.

Investigate these options here:

adding a robots.txt is probably enough

cc @alemkhenter

@awaelchli awaelchli added the docs Documentation related label Feb 23, 2021
@awaelchli awaelchli added this to the 1.3 milestone Feb 23, 2021
@awaelchli awaelchli added the good first issue Good for newcomers label Feb 23, 2021
@dipam7
Copy link
Contributor

dipam7 commented Mar 1, 2021

Hey, @awaelchli I can work on this one. Can you help me understand how the docs are generated and where are the old docs stored?

Thanks

@awaelchli
Copy link
Contributor Author

Hi, that's great.
Here in the contributing file you find the section about the docs:
https://github.com/PyTorchLightning/pytorch-lightning/blob/master/.github/CONTRIBUTING.md#documentation

The docs are hosted on RTD and every time a new lightning version is released, a new build is triggered and stored on the RTD server.

Here is another resource I found:
https://docs.readthedocs.io/en/latest/versions.html#hidden

I am not sure if some of these settings require admin access to the RTD account for lightning
cc @edenlightning @Borda

@Borda Borda added the let's do it! approved to implement label Mar 2, 2021
@Borda
Copy link
Member

Borda commented Mar 2, 2021

YES! I am very much to have reached only stable/latest docs, mind sending PR ;]

@dipam7
Copy link
Contributor

dipam7 commented Mar 6, 2021

Hey, @awaelchli it seems like you were right. RTD creates a default robots.txt file on the RTD server and I would need access to that to change anything. But it seems like a simple Disallow: /path/to/version/ line in the robots.txt should work to avoid earlier versions from being indexed.

I may be able to add a robots.txt under /docs but I don't know how the tree structure of the versions on the server so it'll be best to edit the file autogenerated by RTD.

@awaelchli
Copy link
Contributor Author

Actually I think this needs to be entirely configured in the pytorch lightning account at RTD. The docs here explain about how one can choose version to be "hidden", i.e. invisible to search engines:

https://docs.readthedocs.io/en/stable/versions.html#version-states

@Borda do you have access to RTD and can set old versions as "hidden"?

@dipam7
Copy link
Contributor

dipam7 commented Mar 10, 2021

Yes @awaelchli , that's what I meant. Sorry if that was not clear. It has to be done on the RTD account.

@Borda
Copy link
Member

Borda commented Mar 10, 2021

@Borda do you have access to RTD and can set old versions as "hidden"?

yes, I can so hide all except last release?

@awaelchli
Copy link
Contributor Author

Yes, I think everything except stable could be hidden.

@Borda
Copy link
Member

Borda commented Mar 10, 2021

Screenshot 2021-03-10 at 21 05 15

@awaelchli
Copy link
Contributor Author

awaelchli commented Mar 10, 2021

Oh I didn't know it would affect this list. I think we still need to provide links to all version on the page itself, at least to 1.0. So I'm wondering, is it even possible to hide from search results, but not there in the list?

@Borda
Copy link
Member

Borda commented Mar 16, 2021

@awaelchli I have set https://pytorch-lightning.readthedocs.io/robots.txt
not sure what else I can do with other/custom robots.txt

@Borda Borda self-assigned this Mar 16, 2021
@awaelchli
Copy link
Contributor Author

I think that is exactly what we need! Looks good. Were you able to edit directly this robots file?

@Borda
Copy link
Member

Borda commented Mar 16, 2021

I think that is exactly what we need! Looks good. Were you able to edit directly this robots file?

no, it is generated by setting a version as hidden, https://docs.readthedocs.io/en/latest/versions.html#hidden

@aribornstein
Copy link
Contributor

Resolved this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related good first issue Good for newcomers let's do it! approved to implement
Projects
None yet
Development

No branches or pull requests

4 participants