diff --git a/README.md b/README.md index c36358a..916f640 100644 --- a/README.md +++ b/README.md @@ -344,7 +344,7 @@ Your assets folder must contains a `index.html` file. `index.html` can use the following placeholder variables to retrieve internal data. - `__INDEX_DATA__`: directory listing data -- `__ASSERTS_PREFIX__`: assets url prefix +- `__ASSETS_PREFIX__`: assets url prefix diff --git a/assets/index.html b/assets/index.html index 34a14b9..17cd8a5 100644 --- a/assets/index.html +++ b/assets/index.html @@ -4,12 +4,12 @@ - - + + - + diff --git a/src/server.rs b/src/server.rs index 64b3acd..f83ea4a 100644 --- a/src/server.rs +++ b/src/server.rs @@ -775,7 +775,7 @@ impl Server { .typed_insert(ContentType::from(mime_guess::mime::TEXT_HTML_UTF_8)); let output = self .html - .replace("__ASSERTS_PREFIX__", &self.assets_prefix) + .replace("__ASSETS_PREFIX__", &self.assets_prefix) .replace("__INDEX_DATA__", &serde_json::to_string(&data)?); res.headers_mut() .typed_insert(ContentLength(output.as_bytes().len() as u64)); @@ -1009,7 +1009,7 @@ impl Server { res.headers_mut() .typed_insert(ContentType::from(mime_guess::mime::TEXT_HTML_UTF_8)); self.html - .replace("__ASSERTS_PREFIX__", &self.assets_prefix) + .replace("__ASSETS_PREFIX__", &self.assets_prefix) .replace("__INDEX_DATA__", &serde_json::to_string(&data)?) }; res.headers_mut() diff --git a/tests/fixtures.rs b/tests/fixtures.rs index f191bfb..a83722d 100644 --- a/tests/fixtures.rs +++ b/tests/fixtures.rs @@ -58,7 +58,7 @@ pub fn tmpdir() -> TempDir { if *directory == DIR_ASSETS { tmpdir .child(format!("{}{}", directory, "index.html")) - .write_str("__ASSERTS_PREFIX__index.js;DATA = __INDEX_DATA__") + .write_str("__ASSETS_PREFIX__index.js;DATA = __INDEX_DATA__") .unwrap(); } else { for file in FILES {