From 3eba28432fc83935940e0c44182eec4c97e12b69 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 23 May 2019 13:45:08 +0200 Subject: [PATCH] Add documentation for stabilized flags --- src/doc/rustdoc/src/command-line-arguments.md | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index b21defaedc3..9bbb396323d 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -355,7 +355,27 @@ $ rustdoc src/lib.rs --edition 2018 $ rustdoc --test src/lib.rs --edition 2018 ``` -This flag allows rustdoc to treat your rust code as the given edition. It will compile doctests with +This flag allows `rustdoc` to treat your rust code as the given edition. It will compile doctests with the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015` (the first edition). +## `themes`: add more themes to generated documentation + +By default, `rustdoc` only provides the "dark" and light" themes. If you want to add new ones, +you'll need to this flag as follows: + +```bash +$ rustdoc src/lib.rs --themes /path/to/your/theme/file.css +``` + +### `theme-checker`: check if your themes implement all the required rules + +This flag allows you to check if your themes implement the necessary CSS rules. To put it more +simply, when adding a new theme, it needs to implements all the CSS rules present in the `ðark` and +`light` CSS themes. + +You can use this flag like this: + +```bash +$ rustdoc src/lib.rs --theme-checker /path/to/your/theme/file.css +``` -- 2.44.0