rename jsonfeed to xe_jsonfeed to prepare for my own extensions
Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
parent
03fa2e33a1
commit
6be8b24dd2
|
@ -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",
|
||||
]
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Reference in New Issue