-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Use full_path to show search results #5821
Comments
Proper namesYea, I think we need to do a full audit of our code and figure out all the different names we call these concepts. I suggest:
Right now, in the embed API we're actually cutting the HTML off and expecting a Similarly in other code we're expecting a So we need to define these concepts, and choose what to do with them. Search next stepsMy suggestion for a path forward:
Larger PictureWe also run into issues with this in other parts of our code:
There's also the question of mkdocs, which I don't believe has these concepts, but does output multiple types of HTML structures as well. Edit on GitHubWe also have an issue here when we try and convert from HTML Files to RST files, on the Edit on GitHub links. We need to track the actual RST files that content has come from, which is generally what the There is a problem where we can have an HTML file and not know where it came from:
We need to have the |
Thanks for the explanation, now it's more clear for me the use of page name! |
We just ran into this again. Intersphinx data is storing URL's (so something like |
Sphinx calls this Another useful concepts that may add some context here are: Besides, I'm not 100% sure, but |
This is a follow up of the discussion around #5785
Currently we are indexing the page name as
path
in ES, page name and path are different concepts.We used to build the original path (with extension) using the doctype, but that was removed.
When showing search results we rely on sphinx
https://github.com/rtfd/readthedocs.org/blob/a908684874e7ae71ba9b0c93178491d3339c68ec/readthedocs/core/static-src/core/js/doc-embed/search.js#L41-L42
This isn't always correct, there are cases where this gives 404 in the results (see https://anymail.readthedocs.io/en/stable/search/?q=Anymail+integrates+several+transactional&check_keywords=yes&area=default)
But if we ever extend to mkdocs or any other builder, we are going to face the problem of not knowing the original path (with extension!)
My thoughts:
page_name
, so isn't confusing.full_path
to show results from the search api, so we don't depend on any external things to add the correct extension.The text was updated successfully, but these errors were encountered: