diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-12-20 10:18:45 -0600 |
|---|---|---|
| committer | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-12-20 10:18:45 -0600 |
| commit | 0b0a00cc0551b7f525515e4e53bc0a11bd1b2ebd (patch) | |
| tree | 762b7100621f8a197a04b3f8ec9f03ef7c80a6c4 /src/doc/rustdoc | |
| parent | 0a4a4ffc69f2d05eb8b8a32eaf9bd0607b69fe38 (diff) | |
| download | rust-0b0a00cc0551b7f525515e4e53bc0a11bd1b2ebd.tar.gz rust-0b0a00cc0551b7f525515e4e53bc0a11bd1b2ebd.zip | |
new --static-root-path flag for controlling static file locations
Diffstat (limited to 'src/doc/rustdoc')
| -rw-r--r-- | src/doc/rustdoc/src/unstable-features.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 43cdab27e9d..905b0646534 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -402,3 +402,18 @@ Using `index-page` option enables `enable-index-page` option as well. ### `--enable-index-page`: generate a default index page for docs This feature allows the generation of a default index-page which lists the generated crates. + +### `--static-root-path`: control how static files are loaded in HTML output + +Using this flag looks like this: + +```bash +$ rustdoc src/lib.rs -Z unstable-options --static-root-path '/cache/' +``` + +This flag controls how rustdoc links to its static files on HTML pages. If you're hosting a lot of +crates' docs generated by the same version of rustdoc, you can use this flag to cache rustdoc's CSS, +JavaScript, and font files in a single location, rather than duplicating it once per "doc root" +(grouping of crate docs generated into the same output directory, like with `cargo doc`). Per-crate +files like the search index will still load from the documentation root, but anything that gets +renamed with `--resource-suffix` will load from the given path. |
