From 2be1b417d1a590b8260820e10fc13a1c3c23ff10 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Wed, 1 Sep 2021 15:43:32 +0200 Subject: [PATCH] config.default_language is exposed to templates --- components/config/src/config/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/config/src/config/mod.rs b/components/config/src/config/mod.rs index cc6b858c..37eba3e4 100644 --- a/components/config/src/config/mod.rs +++ b/components/config/src/config/mod.rs @@ -97,6 +97,7 @@ pub struct SerializedConfig<'a> { title: &'a Option, description: &'a Option, languages: HashMap<&'a String, &'a languages::LanguageOptions>, + default_language: &'a str, generate_feed: bool, feed_filename: &'a str, taxonomies: &'a [taxonomies::Taxonomy], @@ -291,6 +292,7 @@ impl Config { title: &options.title, description: &options.description, languages: self.languages.iter().filter(|(k, _)| k.as_str() != lang).collect(), + default_language: &self.default_language, generate_feed: options.generate_feed, feed_filename: &options.feed_filename, taxonomies: &options.taxonomies,