i have no idea how many changes

This commit is contained in:
2024-03-13 19:14:10 +01:00
parent 1740bf5a70
commit 0bdd90edbe
14 changed files with 194 additions and 54 deletions

View File

@ -28,7 +28,8 @@ async fn main() {
// build our application with a single route
let app = router::get_router()
.nest_service("/styles", ServeDir::new("styles"))
.nest_service("/images", ServeDir::new("../static/images"));
.nest_service("/images", ServeDir::new("../static/images"))
.nest_service("/svg", ServeDir::new("../static/svg"));
#[cfg(debug_assertions)]
let app = app.layer(LiveReloadLayer::new());

View File

@ -1,4 +1,4 @@
use crate::filters;
use crate::{components::site_header::Link, filters};
use askama::Template;
use axum::{extract::Path, http::StatusCode};
use chrono::{DateTime, Utc};
@ -49,6 +49,9 @@ pub async fn render_post(Path(post_id): Path<String>) -> Result<PostTemplate, St
tags: parsed.metadata.tags,
body: parsed.body,
site_footer,
header_props: HeaderProps::default(),
header_props: HeaderProps::with_back_link(Link {
href: "/blog".to_string(),
label: "All posts".to_string(),
}),
})
}