File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1010- [ Lints] ( lints.md )
1111- [ Advanced features] ( advanced-features.md )
1212- [ Unstable features] ( unstable-features.md )
13+ - [ Website features] ( website-features.md )
1314- [ Passes] ( passes.md )
1415- [ References] ( references.md )
Original file line number Diff line number Diff line change 1+ # Website features
2+
3+ These features are about using the website generated by ` rustdoc ` .
4+
5+ ## Custom search engines
6+
7+ If you find yourself often referencing online Rust docs you might enjoy using a custom search
8+ engine. This allows you to use the navigation bar directly to search a ` rustdoc ` website.
9+ Most browsers support this feature by letting you define a URL template containing ` %s `
10+ which will be substituted for the search term. As an example, for the standard library you could use
11+ this template:
12+ ```
13+ https://doc.rust-lang.org/stable/std/?search=%s
14+ ```
15+ Note that this will take you to a results page listing all matches. If you want to navigate to the first
16+ result right away (which is often the best match) use the following instead:
17+ ```
18+ https://doc.rust-lang.org/stable/std/?search=%s&go_to_first=true
19+ ```
20+ This URL adds the ` go_to_first=true ` query parameter which can be appended to any ` rustdoc ` search URL
21+ to automatically go to the first result.
You can’t perform that action at this time.
0 commit comments