diff --git a/Cargo.lock b/Cargo.lock index 45c9d64..591696a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1268,16 +1268,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonfeed" -version = "0.3.0" -dependencies = [ - "error-chain", - "serde", - "serde_derive", - "serde_json", -] - [[package]] name = "kankyo" version = "0.3.0" @@ -3207,6 +3197,16 @@ dependencies = [ "dirs", ] +[[package]] +name = "xe_jsonfeed" +version = "0.3.0" +dependencies = [ + "error-chain", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "xesite" version = "2.4.0" @@ -3228,7 +3228,6 @@ dependencies = [ "http", "http-body", "hyper", - "jsonfeed", "kankyo", "lazy_static", "log", @@ -3260,6 +3259,7 @@ dependencies = [ "tracing-subscriber", "url", "uuid 0.8.2", + "xe_jsonfeed", "xml-rs", ] diff --git a/Cargo.toml b/Cargo.toml index 80a737c..62f4a5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ uuid = { version = "0.8", features = ["serde", "v4"] } # workspace dependencies cfcache = { path = "./lib/cfcache" } -jsonfeed = { path = "./lib/jsonfeed" } +xe_jsonfeed = { path = "./lib/jsonfeed" } mi = { path = "./lib/mi" } patreon = { path = "./lib/patreon" } diff --git a/lib/jsonfeed/Cargo.toml b/lib/jsonfeed/Cargo.toml index 6b3b1d6..99172fd 100644 --- a/lib/jsonfeed/Cargo.toml +++ b/lib/jsonfeed/Cargo.toml @@ -1,10 +1,10 @@ [package] -authors = ["Paul Woolcock ", "Xe Iaso "] -description = "Parser for the JSONFeed (http://jsonfeed.org) specification\n" -documentation = "https://docs.rs/jsonfeed" -homepage = "https://github.com/pwoolcoc/jsonfeed" +authors = ["Paul Woolcock ", "Xe Iaso "] +description = "Parser for the JSONFeed (http://jsonfeed.org) specification" +documentation = "https://docs.rs/xe_jsonfeed" +homepage = "https://github.com/Xe/site" license = "MIT/Apache-2.0" -name = "jsonfeed" +name = "xe_jsonfeed" readme = "README.adoc" version = "0.3.0" diff --git a/src/app/mod.rs b/src/app/mod.rs index e938f36..5b8e719 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -54,7 +54,7 @@ pub struct State { pub gallery: Vec, pub talks: Vec, pub everything: Vec, - pub jf: jsonfeed::Feed, + pub jf: xe_jsonfeed::Feed, pub sitemap: Vec, pub patrons: Option, pub mi: mi::Client, @@ -93,11 +93,11 @@ pub async fn init(cfg: PathBuf) -> Result { .take(5) .collect(); - let mut jfb = jsonfeed::Feed::builder() + let mut jfb = xe_jsonfeed::Feed::builder() .title("Xe's Blog") .description("My blog posts and rants about various technology things.") .author( - jsonfeed::Author::new() + xe_jsonfeed::Author::new() .name("Xe") .url("https://xeiaso.net") .avatar(ICON), diff --git a/src/handlers/feeds.rs b/src/handlers/feeds.rs index c69e2f0..375a4f9 100644 --- a/src/handlers/feeds.rs +++ b/src/handlers/feeds.rs @@ -20,7 +20,7 @@ lazy_static! { } #[instrument(skip(state))] -pub async fn jsonfeed(Extension(state): Extension>) -> Json { +pub async fn jsonfeed(Extension(state): Extension>) -> Json { HIT_COUNTER.with_label_values(&["json"]).inc(); let state = state.clone(); Json(state.jf.clone()) diff --git a/src/post/mod.rs b/src/post/mod.rs index 96c3e73..f24b29c 100644 --- a/src/post/mod.rs +++ b/src/post/mod.rs @@ -27,16 +27,16 @@ pub struct NewPost { pub link: String, } -impl Into for Post { - fn into(self) -> jsonfeed::Item { - let mut result = jsonfeed::Item::builder() +impl Into for Post { + fn into(self) -> xe_jsonfeed::Item { + let mut result = xe_jsonfeed::Item::builder() .title(self.front_matter.title) .content_html(self.body_html) .id(format!("https://xeiaso.net/{}", self.link)) .url(format!("https://xeiaso.net/{}", self.link)) .date_published(self.date.to_rfc3339()) .author( - jsonfeed::Author::new() + xe_jsonfeed::Author::new() .name("Xe Iaso") .url("https://xeiaso.net") .avatar("https://xeiaso.net/static/img/avatar.png"),