|
|
@@ -169,7 +169,6 @@ impl Taxonomy { |
|
|
|
self.items.iter().map(|i| SerializedTaxonomyItem::from_item(i, library)).collect(); |
|
|
|
context.insert("terms", &terms); |
|
|
|
context.insert("taxonomy", &self.kind); |
|
|
|
context.insert("lang", &self.kind.lang); |
|
|
|
context.insert("current_url", &config.make_permalink(&self.kind.name)); |
|
|
|
context.insert("current_path", &self.kind.name); |
|
|
|
|
|
|
@@ -418,7 +417,11 @@ mod tests { |
|
|
|
let mut a = None; |
|
|
|
for x in taxonomies { |
|
|
|
match x.kind.name.as_ref() { |
|
|
|
"tags" => t = Some(x), |
|
|
|
"tags" => { |
|
|
|
if x.kind.lang == "en" { |
|
|
|
t = Some(x) |
|
|
|
} |
|
|
|
}, |
|
|
|
"categories" => c = Some(x), |
|
|
|
"auteurs" => a = Some(x), |
|
|
|
_ => unreachable!(), |
|
|
|