atom feed: fixes

This commit is contained in:
Cadey Ratio 2020-07-14 22:27:35 -04:00
parent 4b024d3a77
commit a469f91af5
2 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@ pub fn init(cfg: PathBuf) -> Result<State> {
) )
.feed_url("https://christine.website/blog.json") .feed_url("https://christine.website/blog.json")
.user_comment("This is a JSON feed of my blogposts. For more information read: https://jsonfeed.org/version/1") .user_comment("This is a JSON feed of my blogposts. For more information read: https://jsonfeed.org/version/1")
.home_page_url("https://christine.website")
.icon(ICON) .icon(ICON)
.favicon(ICON); .favicon(ICON);

View File

@ -58,7 +58,7 @@ impl Into<atom::Entry> for Post {
let mut content = atom::ContentBuilder::default(); let mut content = atom::ContentBuilder::default();
content.src(format!("https://christine.website/{}", self.link)); content.src(format!("https://christine.website/{}", self.link));
content.content_type(Some("html".into())); content.content_type(Some("text/html;charset=utf-8".into()));
content.value(Some(xml::escape::escape_str_pcdata(&self.body_html).into())); content.value(Some(xml::escape::escape_str_pcdata(&self.body_html).into()));
let content = content.build().unwrap(); let content = content.build().unwrap();