feat: Support :categories in permalink

This commit is contained in:
Ed Page 2017-07-11 21:08:49 -06:00
parent ee10453bb3
commit a9b4474fdf

View file

@ -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 {