Update documentation about themes
This commit is contained in:
parent
44e5b3bf3e
commit
dee294759b
@ -59,15 +59,8 @@ or the current item whose documentation is being displayed.
|
||||
## The Theme Picker and Search Interface
|
||||
|
||||
When viewing `rustdoc`'s output in a browser with JavaScript enabled,
|
||||
a dynamic interface appears at the top of the page.
|
||||
To the left is the theme picker, denoted with a paint-brush icon,
|
||||
and the search interface, help screen, and options appear to the right of that.
|
||||
|
||||
### The Theme Picker
|
||||
|
||||
Clicking on the theme picker provides a list of themes -
|
||||
by default `ayu`, `light`, and `dark` -
|
||||
which are available for viewing.
|
||||
a dynamic interface appears at the top of the page composed of the search
|
||||
interface, help screen, and options.
|
||||
|
||||
### The Search Interface
|
||||
|
||||
@ -91,12 +84,16 @@ When typing in the search bar, you can prefix your search term with a type
|
||||
followed by a colon (such as `mod:`) to restrict the results to just that
|
||||
kind of item. (The available items are listed in the help popup.)
|
||||
|
||||
### Changing displayed theme
|
||||
|
||||
You can change the displayed theme by opening the settings menu (the gear
|
||||
icon in the upper right) and then pick a new one from there.
|
||||
|
||||
### Shortcuts
|
||||
|
||||
Pressing `S` while focused elsewhere on the page will move focus to the
|
||||
search bar, and pressing `?` shows the help screen,
|
||||
which includes all these shortcuts and more.
|
||||
Pressing `T` focuses the theme picker.
|
||||
|
||||
When the search results are focused,
|
||||
the left and right arrows move between tabs and the up and down arrows move
|
||||
|
@ -109,8 +109,9 @@ rustdoc --extend-css custom.css src/lib.rs
|
||||
|
||||
A good example of using this feature to create a dark theme is documented [on
|
||||
this blog]. Just remember, dark theme is already included in the rustdoc output
|
||||
by clicking on the paintbrush. Adding additional options to the themes are
|
||||
as easy as creating a custom theme `.css` file and using the following syntax:
|
||||
by clicking on the gear icon in the upper right. Adding additional options to the
|
||||
themes are as easy as creating a custom theme `.css` file and using the following
|
||||
syntax:
|
||||
|
||||
```bash
|
||||
rustdoc --theme awesome.css src/lib.rs
|
||||
|
Loading…
x
Reference in New Issue
Block a user