diff --git a/upload/src/main.rs b/upload/src/main.rs index 35146b8..778cbb7 100644 --- a/upload/src/main.rs +++ b/upload/src/main.rs @@ -179,6 +179,14 @@ async fn update_remote_site( let mut create_records = new_sitemap .into_iter() .map(|(k, v)| { + let k = if k == "404.html" { + String::from("404") + } else { + match k.strip_suffix("/index.html") { + Some(k) => format!("/{k}/"), + None => format!("/{k}"), + } + }; let rkey = utils::url_to_rkey(k).wrap_err("Invalid file path. Could not be converted to rkey")?; let rkey = RecordKey(Rkey::new_owned(rkey).into_diagnostic()?);