Add missing suffix for sidebar-items script path
This commit is contained in:
parent
f7bb8e3677
commit
881b427fa3
@ -665,7 +665,7 @@ fn mod_item_in(&mut self, item: &clean::Item) -> Result<(), Error> {
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let items = self.build_sidebar_items(module);
|
||||
let js_dst = self.dst.join("sidebar-items.js");
|
||||
let js_dst = self.dst.join(&format!("sidebar-items{}.js", self.shared.resource_suffix));
|
||||
let v = format!("initSidebarItems({});", serde_json::to_string(&items).unwrap());
|
||||
scx.fs.write(js_dst, v)?;
|
||||
}
|
||||
|
@ -1823,7 +1823,11 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) {
|
||||
ty = it.type_(),
|
||||
path = relpath
|
||||
);
|
||||
write!(buffer, "<script defer src=\"{}sidebar-items.js\"></script>", relpath);
|
||||
write!(
|
||||
buffer,
|
||||
"<script defer src=\"{}sidebar-items{}.js\"></script>",
|
||||
relpath, cx.shared.resource_suffix
|
||||
);
|
||||
// Closes sidebar-elems div.
|
||||
buffer.write_str("</div>");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user