Rollup merge of #59776 - GuillaumeGomez:apply-resource-suffix, r=QuietMisdreavus
Apply resource-suffix to search-index and source-files scripts as well Fixes #59771. r? @QuietMisdreavus
This commit is contained in:
commit
ae0bf84a14
@ -157,11 +157,11 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
|
|||||||
window.rootPath = \"{root_path}\";\
|
window.rootPath = \"{root_path}\";\
|
||||||
window.currentCrate = \"{krate}\";\
|
window.currentCrate = \"{krate}\";\
|
||||||
</script>\
|
</script>\
|
||||||
<script src=\"{root_path}aliases.js\"></script>\
|
<script src=\"{root_path}aliases{suffix}.js\"></script>\
|
||||||
<script src=\"{static_root_path}main{suffix}.js\"></script>\
|
<script src=\"{static_root_path}main{suffix}.js\"></script>\
|
||||||
{static_extra_scripts}\
|
{static_extra_scripts}\
|
||||||
{extra_scripts}\
|
{extra_scripts}\
|
||||||
<script defer src=\"{root_path}search-index.js\"></script>\
|
<script defer src=\"{root_path}search-index{suffix}.js\"></script>\
|
||||||
</body>\
|
</body>\
|
||||||
</html>",
|
</html>",
|
||||||
css_extension = if css_file_extension {
|
css_extension = if css_file_extension {
|
||||||
|
@ -1013,7 +1013,7 @@ themePicker.onblur = handleThemeButtonsBlur;
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let dst = cx.dst.join("aliases.js");
|
let dst = cx.dst.join(&format!("aliases{}.js", cx.shared.resource_suffix));
|
||||||
{
|
{
|
||||||
let (mut all_aliases, _, _) = try_err!(collect(&dst, &krate.name, "ALIASES", false), &dst);
|
let (mut all_aliases, _, _) = try_err!(collect(&dst, &krate.name, "ALIASES", false), &dst);
|
||||||
let mut w = try_err!(File::create(&dst), &dst);
|
let mut w = try_err!(File::create(&dst), &dst);
|
||||||
@ -1099,7 +1099,7 @@ themePicker.onblur = handleThemeButtonsBlur;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let dst = cx.dst.join("source-files.js");
|
let dst = cx.dst.join(&format!("source-files{}.js", cx.shared.resource_suffix));
|
||||||
let (mut all_sources, _krates, _) = try_err!(collect(&dst, &krate.name, "sourcesIndex",
|
let (mut all_sources, _krates, _) = try_err!(collect(&dst, &krate.name, "sourcesIndex",
|
||||||
false),
|
false),
|
||||||
&dst);
|
&dst);
|
||||||
@ -1115,7 +1115,7 @@ themePicker.onblur = handleThemeButtonsBlur;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update the search index
|
// Update the search index
|
||||||
let dst = cx.dst.join("search-index.js");
|
let dst = cx.dst.join(&format!("search-index{}.js", cx.shared.resource_suffix));
|
||||||
let (mut all_indexes, mut krates, variables) = try_err!(collect(&dst,
|
let (mut all_indexes, mut krates, variables) = try_err!(collect(&dst,
|
||||||
&krate.name,
|
&krate.name,
|
||||||
"searchIndex",
|
"searchIndex",
|
||||||
@ -1483,7 +1483,7 @@ impl<'a> SourceCollector<'a> {
|
|||||||
description: &desc,
|
description: &desc,
|
||||||
keywords: BASIC_KEYWORDS,
|
keywords: BASIC_KEYWORDS,
|
||||||
resource_suffix: &self.scx.resource_suffix,
|
resource_suffix: &self.scx.resource_suffix,
|
||||||
extra_scripts: &["source-files"],
|
extra_scripts: &[&format!("source-files{}", self.scx.resource_suffix)],
|
||||||
static_extra_scripts: &[&format!("source-script{}", self.scx.resource_suffix)],
|
static_extra_scripts: &[&format!("source-script{}", self.scx.resource_suffix)],
|
||||||
};
|
};
|
||||||
layout::render(&mut w, &self.scx.layout,
|
layout::render(&mut w, &self.scx.layout,
|
||||||
|
Loading…
Reference in New Issue
Block a user