Skip to content

Commit b5ab5ce

Browse files
talk about --resource-suffix
1 parent 6b29060 commit b5ab5ce

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/doc/rustdoc/src/unstable-features.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,16 @@ $ rustdoc -Z unstable-options --theme-checker theme.css
316316
Before including your theme in crate docs, `rustdoc` will compare all the CSS rules it contains
317317
against the "main" theme included by default. Using this flag will allow you to see which rules are
318318
missing if `rustdoc` rejects your theme.
319+
320+
### `--resource-suffix`: modifying the name of CSS/JavaScript in crate docs
321+
322+
Using this flag looks like this:
323+
324+
```bash
325+
$ rustdoc src/lib.rs -Z unstable-options --resource-suffix suf
326+
```
327+
328+
When rendering docs, `rustdoc` creates several CSS and JavaScript files as part of the output. Since
329+
all these files are linked from every page, changing where they are can be cumbersome if you need to
330+
specially cache them. This flag will rename all these files in the output to include the suffix in
331+
the filename. For example, `main.css` would become `main-suf.css` with the above command.

0 commit comments

Comments
 (0)