talk about --resource-suffix

This commit is contained in:
QuietMisdreavus 2018-03-16 15:06:36 -05:00
parent 6b2906018f
commit b5ab5ceb4b

View file

@ -316,3 +316,16 @@ $ 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.
### `--resource-suffix`: modifying the name of CSS/JavaScript in crate docs
Using this flag looks like this:
```bash
$ rustdoc src/lib.rs -Z unstable-options --resource-suffix suf
```
When rendering docs, `rustdoc` creates several CSS and JavaScript files as part of the output. Since
all these files are linked from every page, changing where they are can be cumbersome if you need to
specially cache them. This flag will rename all these files in the output to include the suffix in
the filename. For example, `main.css` would become `main-suf.css` with the above command.