mirror of
https://github.com/getzola/zola
synced 2024-12-13 22:02:29 +00:00
Merge pull request #1608 from southerntofu/bugfix-default-language
[bugfix] config.default_language is exposed to templates
This commit is contained in:
commit
5c428cc141
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,7 @@ pub struct SerializedConfig<'a> {
|
|||
title: &'a Option<String>,
|
||||
description: &'a Option<String>,
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue