Skip to content

MAINT: Exclude devdocs from search engine results #75

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

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

j1642
Copy link
Contributor

@j1642 j1642 commented Jul 4, 2023

Recently, a search engine linked a user to the devdocs. This change should help guide users to the current docs instead of the devdocs.

@ksunden
Copy link
Member

ksunden commented Jul 4, 2023

My gut feeling is that we should perhaps re-allow devdocs/devel (or at least some subset of that) because that portion of the website which is targeted towards developers of Matplotlib is more useful as the devdocs than as the stable release docs. I agree that pointing to devdocs for examples/api for unreleased things is not ideal, just not sure a full ban on devdocs as a whole is warranted.

@story645
Copy link
Member

story645 commented Jul 4, 2023

Agree with @ksunden on dev docs - almost wondering if it'd be worth it to hide the non-dev devel docs but that's probably overcomplicating things.

@j1642
Copy link
Contributor Author

j1642 commented Jul 5, 2023

I added lines for each item in the 3.7.1 docs, except URLs that lead to "Page not found," such as matplotlib.org/devdocs/_static.

Its possible that something like

Disallow: /devdocs/
Allow: /devdocs/devel/

would accomplish the same thing, but I'm not sure.

It seems like the "Allow" tag is much newer than the "Disallow" tag, and may or may not be universally recognized by web crawlers. RFC 9309 from Sept. 2022, which includes the "Allow" tag, extends another RFC from 1994.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Pretty sure you can disallow: /devdocs/ and allow: /devdocs/devel/ https://developers.google.com/search/docs/crawling-indexing/robots/create-robots-txt

However, I'm not quite sure what the justification for allowing the devdocs version of devel is - it shouldn't change that much, and its confusing to plop people in the middle of devdocs if they are not expecting it.

@story645
Copy link
Member

story645 commented Jul 5, 2023

it shouldn't change that much, and its confusing to plop people in the middle of devdocs if they are not expecting it.

The ways it changes tend to be exactly the things you need to know to build the repo or docs.

@j1642
Copy link
Contributor Author

j1642 commented Jul 6, 2023

However, I'm not quite sure what the justification for allowing the devdocs version of devel is - it shouldn't change that much, and its confusing to plop people in the middle of devdocs if they are not expecting it.

For me, one significant difference is that /stable/devel doesn't include the "make html-skip-subdirs" doc build yet. If someone searches "matplotlib build docs," I would hope they get a /devdoc/devel link just for that command.

@timhoffm
Copy link
Member

IIRC there was the idea to take the development docs out of the library docs. They are logically independent and change at different rates / times.

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Either way, with or without excluding devdocs/devel, this is an improvement.

So, let's go the small step right now and keep devdocs/devel.

@ksunden ksunden merged commit 0eeaedb into matplotlib:main Aug 30, 2023
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.

5 participants