Fix URLs in docs generation

This commit is contained in:
Richard Feldman 2022-05-02 20:14:48 -04:00
parent 64b5c49faf
commit ddfa45eeb5
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
2 changed files with 6 additions and 8 deletions

View file

@ -56,12 +56,9 @@ pub fn generate_docs_html(filenames: Vec<PathBuf>, build_dir: &Path) {
.expect("TODO gracefully handle failing to make the favicon");
let template_html = include_str!("./static/index.html")
.replace("<!-- search.js -->", &format!("{}search.js", base_url()))
.replace("<!-- styles.css -->", &format!("{}styles.css", base_url()))
.replace(
"<!-- favicon.svg -->",
&format!("{}favicon.svg", base_url()),
)
.replace("<!-- search.js -->", "/search.js")
.replace("<!-- styles.css -->", "/styles.css")
.replace("<!-- favicon.svg -->", "/favicon.svg")
.replace(
"<!-- Module links -->",
render_sidebar(package.modules.iter().flat_map(|loaded_module| {