summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2022-03-27 16:33:32 -0700
committerGitHub <noreply@github.com>2022-03-27 16:33:32 -0700
commit566451e9a7a9aef5e392ea3e23a66857e51402cc (patch)
treeb241f0e111583a041a8061a2f41ebbf9ea77568b /src/config.rs
parent15626294b08c719df0a819a7ac85a2e9b09c62c4 (diff)
parent6899d9402725e411c696e0c1942e3230ab4e0e01 (diff)
Merge pull request #1771 from FWYongxing/master
livereload uses host, port and HTTP(S) protocol of current page
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/config.rs b/src/config.rs
index 6ed1e895..765db5d1 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(),
}
}