diff options
| author | Xe Iaso <me@christine.website> | 2022-07-04 14:44:00 +0000 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2022-07-04 14:44:00 +0000 |
| commit | 6be8b24dd293e3d48eafc37cecf1d98971be81f8 (patch) | |
| tree | e7b405b0bcb4d6155b95996002a379f829106c41 /src | |
| parent | 03fa2e33a1fb935776bf385382ddfa1ef2a5020c (diff) | |
| download | xesite-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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/mod.rs | 6 | ||||
| -rw-r--r-- | src/handlers/feeds.rs | 2 | ||||
| -rw-r--r-- | src/post/mod.rs | 8 |
3 files changed, 8 insertions, 8 deletions
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"), |
