From 0230e3297f8431f3ab21ec03e22e9201bbbdd00f Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sun, 27 Sep 2020 14:15:44 +0200 Subject: [PATCH 1/2] Next version --- CHANGELOG.md | 2 ++ Cargo.lock | 2 +- Cargo.toml | 2 +- azure-pipelines.yml | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 281f7e84..98c76b33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 0.13.0 (unreleased) + ## 0.12.1 (2020-09-27) - Add line highlighting in code blocks diff --git a/Cargo.lock b/Cargo.lock index 34326147..d4160dbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2995,7 +2995,7 @@ dependencies = [ [[package]] name = "zola" -version = "0.12.1" +version = "0.13.0" dependencies = [ "atty", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 81193759..6fc4a8cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zola" -version = "0.12.1" +version = "0.13.0" authors = ["Vincent Prouillet "] edition = "2018" license = "MIT" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 05d6173c..86df2772 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,13 +14,13 @@ stages: imageName: 'vs2017-win2016' rustup_toolchain: stable mac-stable: - imageName: 'macos-10.14' + imageName: 'macos-10.15' rustup_toolchain: stable linux-stable: - imageName: 'ubuntu-16.04' + imageName: 'ubuntu-20.04' rustup_toolchain: stable linux-pinned: - imageName: 'ubuntu-16.04' + imageName: 'ubuntu-20.04' rustup_toolchain: 1.43.0 pool: vmImage: $(imageName) From 94c016521ca9edc7478756c11b11bdea0dda5bbc Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 28 Sep 2020 09:36:16 +0200 Subject: [PATCH 2/2] Fix zola serve --- CHANGELOG.md | 4 +++- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/content/documentation/content/overview.md | 1 - src/cmd/serve.rs | 12 ++++++------ 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c76b33..e6fc5fa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## 0.13.0 (unreleased) +## 0.12.2 (2020-09-28) + +- Fix `zola serve` being broken on reload ## 0.12.1 (2020-09-27) diff --git a/Cargo.lock b/Cargo.lock index d4160dbd..79976fb5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2995,7 +2995,7 @@ dependencies = [ [[package]] name = "zola" -version = "0.13.0" +version = "0.12.2" dependencies = [ "atty", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 6fc4a8cb..2f475f63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zola" -version = "0.13.0" +version = "0.12.2" authors = ["Vincent Prouillet "] edition = "2018" license = "MIT" diff --git a/docs/content/documentation/content/overview.md b/docs/content/documentation/content/overview.md index 560c8e99..a3e78aa9 100644 --- a/docs/content/documentation/content/overview.md +++ b/docs/content/documentation/content/overview.md @@ -3,7 +3,6 @@ title = "Overview" weight = 10 +++ - Zola uses the directory structure to determine the site structure. Each child directory in the `content` directory represents a [section](@/documentation/content/section.md) that contains [pages](@/documentation/content/page.md) (your `.md` files). diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 83d2dd7b..2f2f299a 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -184,12 +184,6 @@ fn create_new_site( let base_address = format!("{}:{}", base_url, interface_port); let address = format!("{}:{}", interface, interface_port); - // Stop right there if we can't bind to the address - let bind_address: SocketAddrV4 = address.parse().unwrap(); - if (TcpListener::bind(&bind_address)).is_err() { - return Err(format!("Cannot start server on address {}.", address))?; - } - let base_url = if site.config.base_url.ends_with('/') { format!("http://{}/", base_address) } else { @@ -239,6 +233,12 @@ pub fn serve( )?; console::report_elapsed_time(start); + // Stop right there if we can't bind to the address + let bind_address: SocketAddrV4 = address.parse().unwrap(); + if (TcpListener::bind(&bind_address)).is_err() { + return Err(format!("Cannot start server on address {}.", address))?; + } + // An array of (path, bool, bool) where the path should be watched for changes, and the boolean value // indicates whether this file/folder must exist for zola serve to operate let watch_this = vec![