diff --git a/src/web/page/web_page.rs b/src/web/page/web_page.rs index 6b0a18205..5f6d05485 100644 --- a/src/web/page/web_page.rs +++ b/src/web/page/web_page.rs @@ -10,7 +10,7 @@ use tera::Context; #[macro_export] macro_rules! impl_webpage { ($page:ty = $template:literal $(, status = $status:expr)? $(, content_type = $content_type:expr)? $(,)?) => { - impl_webpage!($page = |_| ::std::borrow::Cow::Borrowed($template) $(, status = $status)? $(, content_type = $content_type)?); + $crate::impl_webpage!($page = |_| ::std::borrow::Cow::Borrowed($template) $(, status = $status)? $(, content_type = $content_type)?); }; ($page:ty = $template:expr $(, status = $status:expr)? $(, content_type = $content_type:expr)? $(,)?) => { diff --git a/src/web/routes.rs b/src/web/routes.rs index 590da0cf6..518c0ff5c 100644 --- a/src/web/routes.rs +++ b/src/web/routes.rs @@ -31,6 +31,15 @@ pub(super) fn build_routes() -> Routes { routes.static_resource("/-/static/:single", super::statics::static_handler); routes.static_resource("/-/static/*", super::statics::static_handler); + routes.internal_page("/-/storage-change-detection.html", { + #[derive(Debug, serde::Serialize)] + struct StorageChangeDetection {} + crate::impl_webpage!(StorageChangeDetection = "storage-change-detection.html"); + fn storage_change_detection(req: &mut iron::Request) -> iron::IronResult { + crate::web::page::WebPage::into_response(StorageChangeDetection {}, req) + } + storage_change_detection + }); routes.internal_page("/", super::releases::home_page); diff --git a/templates/rustdoc/body.html b/templates/rustdoc/body.html index b895b5c4e..6fa517506 100644 --- a/templates/rustdoc/body.html +++ b/templates/rustdoc/body.html @@ -31,6 +31,6 @@ } -{# see comment in ../../static/storage-change-detection.html for details #} - +{# see comment in ../storage-change-detection.html for details #} + {%- include "footer.html" -%} diff --git a/static/storage-change-detection.html b/templates/storage-change-detection.html similarity index 90% rename from static/storage-change-detection.html rename to templates/storage-change-detection.html index 3d90daa2d..448e936ea 100644 --- a/static/storage-change-detection.html +++ b/templates/storage-change-detection.html @@ -8,7 +8,7 @@ ../templates/theme.js when rustdoc in the current window changes the theme --> -