]> git.lizzy.rs Git - rust.git/commitdiff
talk about --themes and --theme-checker
authorQuietMisdreavus <grey@quietmisdreavus.net>
Fri, 16 Mar 2018 19:41:51 +0000 (14:41 -0500)
committerQuietMisdreavus <grey@quietmisdreavus.net>
Fri, 16 Mar 2018 19:41:51 +0000 (14:41 -0500)
src/doc/rustdoc/src/unstable-features.md

index 80b59166503faf8fd7ea682892fce642e5623ff9..3ebc2fa466cb67ef599682e20a6450b3df3a456d 100644 (file)
@@ -292,3 +292,27 @@ Ordinarily, when `rustdoc` prints items in module pages, it will sort them alpha
 some consideration for their stability, and names that end in a number). Giving this flag to
 `rustdoc` will disable this sorting and instead make it print the items in the order they appear in
 the source.
+
+### `--themes`: provide additional themes
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc src/lib.rs -Z unstable-options --themes theme.css
+```
+
+Giving this flag to `rustdoc` will make it copy your theme into the generated crate docs and enable
+it in the theme selector. Note that `rustdoc` will reject your theme file if it doesn't style
+everything the "main" theme does. See `--theme-checker` below for details.
+
+### `--theme-checker`: verify theme CSS for validity
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc -Z unstable-options --theme-checker theme.css
+```
+
+Before including your theme in crate docs, `rustdoc` will compare all the CSS rules it contains
+against the "main" theme included by default. Using this flag will allow you to see which rules are
+missing if `rustdoc` rejects your theme.