Rollup merge of #59992 - QuietMisdreavus:static-settings-path, r=GuillaumeGomez
rustdoc: use --static-root-path for settings.js At the time i was writing https://github.com/rust-lang/docs.rs/pull/332, i noticed that the `settings.js` file that was being loaded was not being loaded from the `--static-root-path`. This PR fixes that so that users on docs.rs can effectively cache this file.
This commit is contained in:
commit
426e747b7e
2 changed files with 6 additions and 1 deletions
|
|
@ -2113,7 +2113,8 @@ impl Context {
|
|||
&final_file);
|
||||
|
||||
// Generating settings page.
|
||||
let settings = Settings::new("./", &self.shared.resource_suffix);
|
||||
let settings = Settings::new(self.shared.static_root_path.deref().unwrap_or("./"),
|
||||
&self.shared.resource_suffix);
|
||||
page.title = "Rustdoc settings";
|
||||
page.description = "Settings of Rustdoc";
|
||||
page.root_path = "./";
|
||||
|
|
|
|||
|
|
@ -12,3 +12,7 @@ pub struct SomeStruct;
|
|||
// @!matches - '"\.\./\.\./source-script\.js"'
|
||||
// @matches - '"\.\./\.\./source-files.js"'
|
||||
// @!matches - '"/cache/source-files\.js"'
|
||||
|
||||
// @has settings.html
|
||||
// @matches - '/cache/settings\.js'
|
||||
// @!matches - '\./settings\.js'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue