aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortilpner2020-06-01 15:26:27 +0200
committertilpner2020-06-01 15:26:27 +0200
commit4b0b4d064cb0106bb2c5d4f4858fcea21600333e (patch)
tree4c1f445a70c62e30e71324299378296c2f1bfe30 /src
parentd645c11a9189a93ce03178962ae6c4e7a1d66050 (diff)
downloadgithub-label-feed-4b0b4d064cb0106bb2c5d4f4858fcea21600333e.tar.gz
github-label-feed-4b0b4d064cb0106bb2c5d4f4858fcea21600333e.tar.xz
github-label-feed-4b0b4d064cb0106bb2c5d4f4858fcea21600333e.zip
rss: add content namespace
Diffstat (limited to 'src')
-rw-r--r--src/generate.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/generate.rs b/src/generate.rs
index 36f05f3..4ed1de0 100644
--- a/src/generate.rs
+++ b/src/generate.rs
@@ -1,5 +1,6 @@
use std::{
- fs::{ self, File }
+ fs::{ self, File },
+ collections::HashMap
};
use sqlx::prelude::*;
@@ -222,6 +223,13 @@ pub async fn run(mut conn: &mut Conn, opts: GenerateOpts) -> Result<()> {
channel.pub_date(Utc::now().to_rfc2822());
channel.items(rss_items);
+ channel.namespaces({
+ let mut ns = HashMap::new();
+ ns.insert("content".to_owned(),
+ "http://purl.org/rss/1.0/modules/content/".to_owned());
+ ns
+ });
+
let channel = channel.build().expect("Failed to build RSS channel");
let channel_path = feed_directory.join("rss.xml");
let mut out_file = File::create(channel_path)?;