summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/blog/mod.rs1
-rw-r--r--src/main.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/blog/mod.rs b/src/blog/mod.rs
index b58750e..b301171 100644
--- a/src/blog/mod.rs
+++ b/src/blog/mod.rs
@@ -13,6 +13,7 @@ use std::{path::PathBuf, str::FromStr};
use tokio::fs::read_to_string;
pub const ARTICLE_ROOT: &'static str = "./blog/articles";
+pub const ASSET_ROOT: &'static str = "./blog/assets";
#[get("/blog")]
pub fn r_blog() -> Redirect {
diff --git a/src/main.rs b/src/main.rs
index 72bd891..85670c4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,7 +13,7 @@ pub mod wellknown;
use blog::*;
use error::*;
use pages::*;
-use rocket::{catchers, fairing::AdHoc, http::Header, routes};
+use rocket::{catchers, fairing::AdHoc, fs::FileServer, http::Header, routes};
use source::*;
use wellknown::*;
@@ -26,6 +26,7 @@ async fn main() {
Box::pin(async {})
}))
.manage(prepare_source())
+ .mount("/blog/assets", FileServer::from(ASSET_ROOT))
.mount(
"/",
routes![