diff --git a/Cargo.lock b/Cargo.lock index 9b9aac6..87135fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2151,9 +2151,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.42" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ "bitflags 2.6.0", "errno", diff --git a/server/src/html.rs b/server/src/html.rs index 4fc227d..01199d0 100644 --- a/server/src/html.rs +++ b/server/src/html.rs @@ -828,7 +828,7 @@ pub(crate) async fn rss(db: &BlogDb) -> String { } #[cfg(not(debug_assertions))] { - ["https://", env!("DOMAIN"), "/blog/", &entry.id].concat() + ["https://", env!("DOMAIN"), "/blog/", &post.id].concat() } }; let item = rewrite_str( @@ -856,9 +856,11 @@ pub(crate) async fn rss(db: &BlogDb) -> String { .collect::>() .try_into() .unwrap_or_default(); - let date_time: DateTime = Utc - .with_ymd_and_hms(date[0] as i32, date[1], date[2], 0, 0, 0) - .unwrap(); + let date_time: DateTime = + FixedOffset::west_opt(5 * 3600) // New York City + .unwrap() + .with_ymd_and_hms(date[0] as i32, date[1], date[2], 0, 0, 0) + .unwrap(); date_time.to_rfc2822() }; pub_date.set_inner_content(&date, ContentType::Text); diff --git a/server/src/server/routes/api/editor.rs b/server/src/server/routes/api/editor.rs index 01041f4..db0ea85 100644 --- a/server/src/server/routes/api/editor.rs +++ b/server/src/server/routes/api/editor.rs @@ -102,7 +102,18 @@ impl Block { ] .concat(), Block::image { file, caption } => { - ["\"",", ""), "\"/>"].concat() + let src = { + + #[cfg(debug_assertions)] + { + &file.url + } + #[cfg(not(debug_assertions))] + { + &["https://", env!("DOMAIN"), &file.url].concat() + } + }; + ["\"",", ""), "\"/>"].concat() } Block::delimiter {} => "
".to_string(),