From c728a8692b36b493ba4cf7efc89e9ce7e50b8730 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 7 Jun 2021 21:00:00 +0200 Subject: [PATCH] Clear SITE_CONTENT on full reload --- src/cmd/serve.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 69539915..53bcfcfa 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -228,6 +228,8 @@ fn create_new_site( include_drafts: bool, ws_port: Option, ) -> Result<(Site, String)> { + SITE_CONTENT.write().unwrap().clear(); + let mut site = Site::new(root_dir, config_file)?; let base_address = format!("{}:{}", base_url, interface_port);