mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 14:07:04 +00:00
Auto merge of #79642 - ijackson:default-theme-stab, r=jyn514
rustdoc: stabilise --default-theme command line option As discussed in #77213, this seems like it has bedded in and can be safely and usefully made stable. (rustdoc already has other stable options that interact quite intimately with the rustdoc-supplied CSS, and also an option for supplying entirely different CSS, so exposing the theme names this way seems a very minor step.) There is also a commit to do some minor grammar fixes to the help message.
This commit is contained in:
commit
dc6121ca68
@ -237,6 +237,26 @@ for a target triple that's different than your host triple.
|
||||
|
||||
All of the usual caveats of cross-compiling code apply.
|
||||
|
||||
## `--default-theme`: set the default theme
|
||||
|
||||
Using this flag looks like this:
|
||||
|
||||
```bash
|
||||
$ rustdoc src/lib.rs --default-theme=ayu
|
||||
```
|
||||
|
||||
Sets the default theme (for users whose browser has not remembered a
|
||||
previous theme selection from the on-page theme picker).
|
||||
|
||||
The supplied value should be the lowercase version of the theme name.
|
||||
The set of available themes can be seen in the theme picker in the
|
||||
generated output.
|
||||
|
||||
Note that the set of available themes - and their appearance - is not
|
||||
necessarily stable from one rustdoc version to the next. If the
|
||||
requested theme does not exist, the builtin default (currently
|
||||
`light`) is used instead.
|
||||
|
||||
## `--markdown-css`: include more CSS files when rendering markdown
|
||||
|
||||
Using this flag looks like this:
|
||||
|
@ -263,13 +263,13 @@ fn opts() -> Vec<RustcOptGroup> {
|
||||
"sort modules by where they appear in the program, rather than alphabetically",
|
||||
)
|
||||
}),
|
||||
unstable("default-theme", |o| {
|
||||
stable("default-theme", |o| {
|
||||
o.optopt(
|
||||
"",
|
||||
"default-theme",
|
||||
"Set the default theme. THEME should be the theme name, generally lowercase. \
|
||||
If an unknown default theme is specified, the builtin default is used. \
|
||||
The set of themes, and the rustdoc built-in default is not stable.",
|
||||
The set of themes, and the rustdoc built-in default, are not stable.",
|
||||
"THEME",
|
||||
)
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user