diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-12 22:04:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-12 22:04:35 +0200 |
| commit | b01f0d392864fd581fd6cb4cd1648959bdfbfc5f (patch) | |
| tree | a6a7b3822dfffd06078b32ff7b29b992eef825d5 /src | |
| parent | 57393be6fba9bc6f09aa4ba6587da9633edac675 (diff) | |
| parent | b76821b4de51fa79c4f593079679f63b7476f737 (diff) | |
| download | rust-b01f0d392864fd581fd6cb4cd1648959bdfbfc5f.tar.gz rust-b01f0d392864fd581fd6cb4cd1648959bdfbfc5f.zip | |
Rollup merge of #110235 - GuillaumeGomez:fix-extend-css, r=notriddle
Fix `--extend-css` option Fixes #110002. The file was generated in the wrong folder so I moved it into `static.files` as it made more sense to have there instead of changing the path in the templates. I also added a GUI test to ensure that this option won't break unexpectedly again.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/test.rs | 2 | ||||
| -rw-r--r-- | src/doc/rustdoc/src/command-line-arguments.md | 5 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/page.html | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index ebba6e80f40..cc0e34c6035 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1064,6 +1064,8 @@ impl Step for RustdocGUI { cargo.env("RUSTDOCFLAGS", "-Zunstable-options --generate-link-to-definition"); } else if entry.file_name() == "scrape_examples" { cargo.arg("-Zrustdoc-scrape-examples"); + } else if entry.file_name() == "extend_css" { + cargo.env("RUSTDOCFLAGS", &format!("--extend-css extra.css")); } builder.run(&mut cargo); } diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index 2a2e51b2f63..dfc80426372 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -320,10 +320,7 @@ $ rustdoc src/lib.rs --extend-css extra.css ``` With this flag, the contents of the files you pass are included at the bottom -of Rustdoc's `theme.css` file. - -While this flag is stable, the contents of `theme.css` are not, so be careful! -Updates may break your theme extensions. +of the `theme.css` file. ## `--sysroot`: override the system root diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index 532660e3d33..9133f899af6 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -64,7 +64,7 @@ </noscript> {# #} {% if layout.css_file_extension.is_some() %} <link rel="stylesheet" {#+ #} - href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {# #} + href="{{page.root_path|safe}}theme{{page.resource_suffix}}.css"> {# #} {% endif %} {% if !layout.favicon.is_empty() %} <link rel="icon" href="{{layout.favicon}}"> {# #} |
