aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-07-04 14:44:00 +0000
committerXe Iaso <me@christine.website>2022-07-04 14:44:00 +0000
commit6be8b24dd293e3d48eafc37cecf1d98971be81f8 (patch)
treee7b405b0bcb4d6155b95996002a379f829106c41
parent03fa2e33a1fb935776bf385382ddfa1ef2a5020c (diff)
downloadxesite-6be8b24dd293e3d48eafc37cecf1d98971be81f8.tar.xz
xesite-6be8b24dd293e3d48eafc37cecf1d98971be81f8.zip
rename jsonfeed to xe_jsonfeed to prepare for my own extensions
Signed-off-by: Xe Iaso <me@christine.website>
-rw-r--r--Cargo.lock22
-rw-r--r--Cargo.toml2
-rw-r--r--lib/jsonfeed/Cargo.toml10
-rw-r--r--src/app/mod.rs6
-rw-r--r--src/handlers/feeds.rs2
-rw-r--r--src/post/mod.rs8
6 files changed, 25 insertions, 25 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 45c9d64..591696a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1269,16 +1269,6 @@ dependencies = [
]
[[package]]
-name = "jsonfeed"
-version = "0.3.0"
-dependencies = [
- "error-chain",
- "serde",
- "serde_derive",
- "serde_json",
-]
-
-[[package]]
name = "kankyo"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3208,6 +3198,16 @@ dependencies = [
]
[[package]]
+name = "xe_jsonfeed"
+version = "0.3.0"
+dependencies = [
+ "error-chain",
+ "serde",
+ "serde_derive",
+ "serde_json",
+]
+
+[[package]]
name = "xesite"
version = "2.4.0"
dependencies = [
@@ -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 <paul@woolcock.us>", "Xe Iaso <me@christine.website>"]
-description = "Parser for the JSONFeed (http://jsonfeed.org) specification\n"
-documentation = "https://docs.rs/jsonfeed"
-homepage = "https://github.com/pwoolcoc/jsonfeed"
+authors = ["Paul Woolcock <paul@woolcock.us>", "Xe Iaso <me@xeiaso.net>"]
+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<Post>,
pub talks: Vec<Post>,
pub everything: Vec<Post>,
- pub jf: jsonfeed::Feed,
+ pub jf: xe_jsonfeed::Feed,
pub sitemap: Vec<u8>,
pub patrons: Option<patreon::Users>,
pub mi: mi::Client,
@@ -93,11 +93,11 @@ pub async fn init(cfg: PathBuf) -> Result<State> {
.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<Arc<State>>) -> Json<jsonfeed::Feed> {
+pub async fn jsonfeed(Extension(state): Extension<Arc<State>>) -> Json<xe_jsonfeed::Feed> {
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<jsonfeed::Item> for Post {
- fn into(self) -> jsonfeed::Item {
- let mut result = jsonfeed::Item::builder()
+impl Into<xe_jsonfeed::Item> 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"),