diff options
author | Clark <fwyongxing@gmail.com> | 2022-03-19 04:38:16 +0800 |
---|---|---|
committer | Clark <fwyongxing@gmail.com> | 2022-03-19 04:38:16 +0800 |
commit | 6899d9402725e411c696e0c1942e3230ab4e0e01 (patch) | |
tree | 8f15f90d122c473abb995f202844135c1dab0d16 /src/config.rs | |
parent | fa0f9df497d6f17cc519a20e687b7302ecf5716c (diff) |
livereload uses host&port of current page; livereload works with a HTTPS site
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/config.rs b/src/config.rs index daeccbd0..6423100e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -531,16 +531,16 @@ pub struct HtmlConfig { pub cname: Option<String>, /// Edit url template, when set shows a "Suggest an edit" button for /// directly jumping to editing the currently viewed page. - /// Contains {path} that is replaced with chapter source file path + /// Contains {path} that is replaced with chapter source file path[[[[ pub edit_url_template: Option<String>, - /// This is used as a bit of a workaround for the `mdbook serve` command. - /// Basically, because you set the websocket port from the command line, the - /// `mdbook serve` command needs a way to let the HTML renderer know where - /// to point livereloading at, if it has been enabled. + /// Endpoint of websocket, for livereload usage. Value loaded from .toml file + /// is ignored, because our code overrides this field with the value [`LIVE_RELOAD_ENDPOINT`] + /// + /// [`LIVE_RELOAD_ENDPOINT`]: cmd::serve::LIVE_RELOAD_ENDPOINT /// /// This config item *should not be edited* by the end user. #[doc(hidden)] - pub livereload_url: Option<String>, + pub live_reload_endpoint: Option<String>, /// The mapping from old pages to new pages/URLs to use when generating /// redirects. pub redirect: HashMap<String, String>, @@ -569,7 +569,7 @@ impl Default for HtmlConfig { input_404: None, site_url: None, cname: None, - livereload_url: None, + live_reload_endpoint: None, redirect: HashMap::new(), } } |