From ae7a65b51f3dda4d6789483e930574437c6651e6 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 10 Sep 2018 20:29:57 +0200 Subject: [PATCH] Fix base-url not overriding processed images urls Closes #418 --- CHANGELOG.md | 1 + src/cmd/build.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb14e556..07c982f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Link checker will not try to validate email links anymore - Load table and footnote markdown extensions in `markdown` filter - `get_url` now defaults to not adding a trailing slash +- Fix `--base-url` not overriding processed images URLs ## 0.4.2 (2018-09-03) diff --git a/src/cmd/build.rs b/src/cmd/build.rs index 6c509fce..aca974e2 100644 --- a/src/cmd/build.rs +++ b/src/cmd/build.rs @@ -9,7 +9,7 @@ pub fn build(config_file: &str, base_url: Option<&str>, output_dir: &str) -> Res let mut site = Site::new(env::current_dir().unwrap(), config_file)?; site.set_output_path(output_dir); if let Some(b) = base_url { - site.config.base_url = b.to_string(); + site.set_base_url(b.to_string()); } site.load()?; console::notify_site_size(&site);