summaryrefslogtreecommitdiff
path: root/src/blog/mod.rs
blob: 5cc5f0b552ce52097b0be1290b61886887f79478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::layout::{DynScaffold, Scaffold};
use rocket::{get, response::Redirect};

#[get("/blog")]
pub fn r_blog() -> Redirect {
    Redirect::to(rocket::uri!(r_blog_index()))
}

#[get("/blog/index")]
pub fn r_blog_index() -> DynScaffold<'static> {
    Scaffold {
        title: "blog index".to_string(),
        content: markup::new! {},
    }
}