diff --git a/src/routes/blog.rs b/src/routes/blog.rs index 95a7d8c..1d5279e 100644 --- a/src/routes/blog.rs +++ b/src/routes/blog.rs @@ -118,12 +118,12 @@ struct BlogPostTemplate { post: Option, } -#[get("/blog/{id}")] +#[get("/blog/p/{id}")] pub async fn page(path: web::Path<(String,)>, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_post(path.into_inner().0, config.get_ref().to_owned())) } -pub fn build_post(file: String, config: Config) -> String { +fn build_post(file: String, config: Config) -> String { let mut post = None; let infos = get_post(&mut post, file); diff --git a/templates/blog/index.html b/templates/blog/index.html index 5dafa65..f246164 100644 --- a/templates/blog/index.html +++ b/templates/blog/index.html @@ -14,7 +14,7 @@
    {{#posts}} -
  • +
  • {{>blog/date.html}}

    {{title}}