diff --git a/src/document.rs b/src/document.rs index b43517c..b590bda 100644 --- a/src/document.rs +++ b/src/document.rs @@ -12,6 +12,7 @@ use jsonfeed; use jsonfeed::Item; use jsonfeed::Content; use serde_yaml; +use itertools; #[cfg(all(feature="syntax-highlight", not(windows)))] use syntax_highlight::{initialize_codeblock, decorate_markdown}; @@ -98,6 +99,9 @@ fn permalink_attributes(front: &frontmatter::Frontmatter, attributes.insert(":slug".to_owned(), front.slug.clone()); + attributes.insert(":categories".to_owned(), + itertools::join(front.categories.iter(), "/")); + attributes.insert(":output_ext".to_owned(), ".html".to_owned()); if let Some(ref date) = front.published_date {