summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs3
-rw-r--r--src/misc/mod.rs4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index a83c1ae..21eac18 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -25,6 +25,7 @@ async fn main() -> Result<()> {
let state = Arc::new(internal::init().await?);
let index = warp::get().and(path::end().and_then(misc::handlers::index));
+ let about = warp::path!("about").and_then(misc::handlers::about);
let blog_index = warp::path!("blog")
.and(give_site_state(state.clone()))
@@ -35,7 +36,7 @@ async fn main() -> Result<()> {
.and_then(blog::handlers::post);
let static_files = warp::path("static").and(warp::fs::dir("./statics"));
- let site = index
+ let site = index.or(about)
.or(blog_index.or(blog_post))
.or(static_files)
.with(warp::log("site"));
diff --git a/src/misc/mod.rs b/src/misc/mod.rs
index c2992cc..b5b3262 100644
--- a/src/misc/mod.rs
+++ b/src/misc/mod.rs
@@ -6,4 +6,8 @@ pub mod handlers {
pub async fn index() -> Result<impl Reply, Rejection> {
Response::builder().html(|o| templates::index_html(o))
}
+
+ pub async fn about() -> Result<impl Reply, Rejection> {
+ Response::builder().html(|o| templates::about_html(o))
+ }
}