+8
upload/src/main.rs
+8
upload/src/main.rs
···
179
179
let mut create_records = new_sitemap
180
180
.into_iter()
181
181
.map(|(k, v)| {
182
+
let k = if k == "404.html" {
183
+
String::from("404")
184
+
} else {
185
+
match k.strip_suffix("/index.html") {
186
+
Some(k) => format!("/{k}/"),
187
+
None => format!("/{k}"),
188
+
}
189
+
};
182
190
let rkey =
183
191
utils::url_to_rkey(k).wrap_err("Invalid file path. Could not be converted to rkey")?;
184
192
let rkey = RecordKey(Rkey::new_owned(rkey).into_diagnostic()?);