-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Doc 18498 #18528
Doc 18498 #18528
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. |
Drop this server.py into /doc for testing the 404 page https://gist.github.com/seanjensengrey/0f5545be4f1c8562d126 And load http://localhost:8080/core/option/type.Option.html#method.unwrap_or_else you should see |
It is good to see progress on this, and it is definitely an improvement over what we have now. The best-case would be having it use the rustdoc search infrastructure to get the feedback right on the page, e.g. "opiton". |
@@ -11,9 +11,33 @@ Looks like you've taken a wrong turn. | |||
|
|||
Some things that might be helpful to you though: | |||
|
|||
## Search | |||
* <form action="https://duckduckgo.com/"> | |||
<input type="text" id="code.search" name="q" size="80"></input> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think .
is a good character to have in an ID (conflicts with the class selector in CSS), conventionally this one might use code-search
.
The heuristic implemented here doesn't appear to handle links like the following very well:
I do not think this should block landing this pull request, since it is a helpful feature (not core to the functionality of the language or the docs) and this can easily be improved over time. |
Agree that we could have more heuristics, also certain paths could get decomposed and rewritten as http://doc.rust-lang.org/core/?search=unwrap_or_else |
Search functionality uses both duckduckgo for site wide doc search and the rust specific documentation search @ http://doc.rust-lang.org/core/?search=unwrap_or_else
I updated the commit to rename the ID as well as add a second link to the rust documentation search tool. See the screenshot above. |
This addresses #18498 by adding a prepopulated search box to do site search on `doc.rust-lang.org` using duckduckgo AND generating a search url against the rust documentation using the internal search facilities. * https://duckduckgo.com/?q=type+Option+unwrap_or_else+site%3Adoc.rust-lang.org * http://doc.rust-lang.org/core/?search=unwrap_or_else
This addresses #18498 by adding a prepopulated search box to do site search on
doc.rust-lang.org
using duckduckgo AND generating a search url against the rust documentation using the internal search facilities.