parent
9191a2726c
commit
7ce4f75d09
@ -3,6 +3,7 @@
|
|||||||
## 0.15.1 (unreleased)
|
## 0.15.1 (unreleased)
|
||||||
|
|
||||||
- Fix markdown shortcodes not being rendered correctly
|
- Fix markdown shortcodes not being rendered correctly
|
||||||
|
- Fix config data not getting to the templates
|
||||||
|
|
||||||
## 0.15.0 (2021-12-05)
|
## 0.15.0 (2021-12-05)
|
||||||
|
|
||||||
|
|||||||
@ -332,7 +332,7 @@ pub fn merge(into: &mut Toml, from: &Toml) -> Result<()> {
|
|||||||
|
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
fn default() -> Config {
|
fn default() -> Config {
|
||||||
let mut conf = Config {
|
Config {
|
||||||
base_url: DEFAULT_BASE_URL.to_string(),
|
base_url: DEFAULT_BASE_URL.to_string(),
|
||||||
title: None,
|
title: None,
|
||||||
description: None,
|
description: None,
|
||||||
@ -357,9 +357,7 @@ impl Default for Config {
|
|||||||
search: search::Search::default(),
|
search: search::Search::default(),
|
||||||
markdown: markup::Markdown::default(),
|
markdown: markup::Markdown::default(),
|
||||||
extra: HashMap::new(),
|
extra: HashMap::new(),
|
||||||
};
|
}
|
||||||
conf.add_default_language();
|
|
||||||
conf
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -707,4 +705,17 @@ highlight_themes_css = [
|
|||||||
let config = Config::parse(config);
|
let config = Config::parse(config);
|
||||||
assert_eq!(config.is_err(), true);
|
assert_eq!(config.is_err(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/getzola/zola/issues/1687
|
||||||
|
#[test]
|
||||||
|
fn regression_config_default_lang_data() {
|
||||||
|
let config = r#"
|
||||||
|
base_url = "https://www.getzola.org/"
|
||||||
|
title = "Zola"
|
||||||
|
"#;
|
||||||
|
|
||||||
|
let config = Config::parse(config).unwrap();
|
||||||
|
let serialised = config.serialize(&config.default_language);
|
||||||
|
assert_eq!(serialised.title, &config.title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user