fixed blog by id route embeds and removed a single quote
This commit is contained in:
parent
1fd3bdd49f
commit
74ab125243
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ async fn blog() -> impl Responder {
|
|||
context.insert("posts", &posts);
|
||||
context.insert("username", &username);
|
||||
context.insert("sitetitle", &format!("{}' blog'", &username));
|
||||
context.insert("sitedescription", &format!("Last 5 posts of {}' blog'", &username));
|
||||
context.insert("sitedescription", &format!("Last 5 posts of {}' blog", &username));
|
||||
|
||||
// one-off render blog template with context
|
||||
let result = Tera::one_off(
|
||||
|
@ -93,7 +93,7 @@ async fn blog_by_id(web::Path(post_id): web::Path<std::string::String>) -> impl
|
|||
context.insert("posts", &[&post]);
|
||||
context.insert("username", &username);
|
||||
context.insert("sitetitle", &post.title);
|
||||
context.insert("sitedescription", &format!("Last 5 posts of {}' blog'", &username));
|
||||
context.insert("sitedescription", &post.body);
|
||||
|
||||
// one-off render blog template with context
|
||||
let result = Tera::one_off(
|
||||
|
|
Loading…
Reference in a new issue