Skip to content

Commit

Permalink
Merge pull request #1185 from getzola/next
Browse files Browse the repository at this point in the history
Next version
  • Loading branch information
Keats authored Sep 28, 2020
2 parents 4bbf7a6 + 94c0165 commit 84ecd2a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.12.2 (2020-09-28)

- Fix `zola serve` being broken on reload

## 0.12.1 (2020-09-27)

- Add line highlighting in code blocks
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zola"
version = "0.12.1"
version = "0.12.2"
authors = ["Vincent Prouillet <hello@vincentprouillet.com>"]
edition = "2018"
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion docs/content/documentation/content/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
12 changes: 6 additions & 6 deletions src/cmd/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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![
Expand Down

0 comments on commit 84ecd2a

Please sign in to comment.