From 6b2906018f93a9813392056da4c3de855d92f619 Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Fri, 16 Mar 2018 14:41:51 -0500 Subject: [PATCH] talk about --themes and --theme-checker --- src/doc/rustdoc/src/unstable-features.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 80b59166503..3ebc2fa466c 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -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. -- 2.44.0