[WIP] A (somewhat barebones) atproto app for creating custom sites without hosting!

upload: create the correct record key

/404.html => `404` (special case)
/docs/index.html => `::docs::`
/cat.jpg => `::cat.jpg`

vielle.dev 519b6262 df00cf6b

verified
Changed files
+8
upload
src
+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()?);