From 746535b7645b6aeb6eb58dced984530744fef161 Mon Sep 17 00:00:00 2001 From: Lukas Stabe Date: Thu, 24 Sep 2020 05:22:45 +0200 Subject: add title option (#335) and breadcrumb links in heading --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 7cda975..1830a70 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,6 +79,9 @@ pub struct MiniserveConfig { /// If false, creation of zip archives is disabled pub zip_enabled: bool, + + /// Shown instead of host in page title and heading + pub title: Option, } fn main() { @@ -286,6 +289,7 @@ fn configure_app(app: &mut web::ServiceConfig, conf: &MiniserveConfig) { let file_upload = conf.file_upload; let tar_enabled = conf.tar_enabled; let zip_enabled = conf.zip_enabled; + let title = conf.title.clone(); upload_route = if let Some(random_route) = conf.random_route.clone() { format!("/{}/upload", random_route) } else { @@ -315,6 +319,7 @@ fn configure_app(app: &mut web::ServiceConfig, conf: &MiniserveConfig) { u_r.clone(), tar_enabled, zip_enabled, + title.clone(), ) }) .default_handler(web::to(error_404)), -- cgit v1.2.3