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

Links in search for nested pages are broken for mkdocs #1633

Closed
gregmuellegger opened this issue Sep 7, 2015 · 6 comments
Closed

Links in search for nested pages are broken for mkdocs #1633

gregmuellegger opened this issue Sep 7, 2015 · 6 comments
Labels
Bug A bug
Milestone

Comments

@gregmuellegger
Copy link
Contributor

#1628 reports about links in searches that are broken since they don't include the directory name, but only the filename in the link target.

For example, the search for "database" in the backands-docs project gives the following link:

http://backand-docs.readthedocs.org/en/latest/customactions/index.html?highlight=database
But it's broken, the following link would be correct:
http://backand-docs.readthedocs.org/en/latest/apidocs/customactions/index.html

@gregmuellegger gregmuellegger added the Bug A bug label Sep 7, 2015
@gregmuellegger
Copy link
Contributor Author

@agjohnson any ideas on this?

@agjohnson
Copy link
Contributor

Not off the top of my head, I'd have to play with the mkdocs integration, something I don't do often.

@gregmuellegger
Copy link
Contributor Author

It's hard for me to debug as I don't have a working elastic search setup, but I assume that either the path gets extracted wrongly from the mkdocs' json files (here is the relevant code) or that the JSON mkdocs produces is wrong or that the path is mangled with before stored in elasticsearch.

I tested locally by calling process_mkdocs_json manually. However this always raises an error since it tries to process the mkdocs/search_index.json file as well, which does not contain the expected values (raised exception is KeyError: url here).

When I delete the wrongly index files, the returned path is correct for all the processed index.json files, so for the example in the issue description above the path is returned correctly as apidocs/customaction/index.

I'm not sure how the search then returns the bad path on readthedocs.org

@marcelstoer
Copy link
Contributor

@gregmuellegger any idea what to do if the index ain't loaded at all (#2020)?

@stsewd
Copy link
Member

stsewd commented Aug 24, 2018

We don't index from the json artifacts for mkdocs projects, as they don't support that option anymore.

@stsewd
Copy link
Member

stsewd commented Oct 30, 2018

Closing as mention above, we don't support indexing from mkdocs projects at the moment, anyone interesting in rtd and search support on mkdocs follow #1088

@stsewd stsewd closed this as completed Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

No branches or pull requests

4 participants