zola serve's live reload feature used to fail on Windows due to the path separator (`\`) to not being escaped.
This commit is contained in:
parent
657905ed6e
commit
358446a65f
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3270,6 +3270,7 @@ dependencies = [
|
||||||
"notify",
|
"notify",
|
||||||
"open",
|
"open",
|
||||||
"relative-path",
|
"relative-path",
|
||||||
|
"serde_json",
|
||||||
"site",
|
"site",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
|
@ -36,6 +36,7 @@ ctrlc = "3"
|
||||||
open = "1.2"
|
open = "1.2"
|
||||||
globset = "0.4"
|
globset = "0.4"
|
||||||
relative-path = "1"
|
relative-path = "1"
|
||||||
|
serde_json = "1.0"
|
||||||
|
|
||||||
site = { path = "components/site" }
|
site = { path = "components/site" }
|
||||||
errors = { path = "components/errors" }
|
errors = { path = "components/errors" }
|
||||||
|
|
|
@ -153,13 +153,13 @@ fn rebuild_done_handling(broadcaster: &Sender, res: Result<()>, reload_path: &st
|
||||||
r#"
|
r#"
|
||||||
{{
|
{{
|
||||||
"command": "reload",
|
"command": "reload",
|
||||||
"path": "{}",
|
"path": {},
|
||||||
"originalPath": "",
|
"originalPath": "",
|
||||||
"liveCSS": true,
|
"liveCSS": true,
|
||||||
"liveImg": true,
|
"liveImg": true,
|
||||||
"protocol": ["http://livereload.com/protocols/official-7"]
|
"protocol": ["http://livereload.com/protocols/official-7"]
|
||||||
}}"#,
|
}}"#,
|
||||||
reload_path
|
serde_json::to_string(&reload_path).unwrap()
|
||||||
))
|
))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue