From 2eccb530adaa826018ff7de6f79195245298136e Mon Sep 17 00:00:00 2001 From: kirbylife Date: Thu, 19 Dec 2019 16:26:10 -0600 Subject: [PATCH] improved the metadata to a better seo --- src/admin.rs | 2 +- templates/base.html.tera | 15 +++++++-------- templates/post.html.tera | 10 ++++++++++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/admin.rs b/src/admin.rs index 29f0287..28886c1 100644 --- a/src/admin.rs +++ b/src/admin.rs @@ -142,7 +142,7 @@ fn write_edit_post(mut cookies: Cookies<'_>, id: i32, post: Form) -> Re if cookie.value() == password { match posts::edit_post(id, &post) { Ok(post) => Redirect::to(format!("/post/{}", post.id)), - Err(_) => Redirect::to("admin/add_post"), + Err(_) => Redirect::to("admin/edit_post"), } } else { Redirect::to("/admin") diff --git a/templates/base.html.tera b/templates/base.html.tera index 2c22b75..749a595 100644 --- a/templates/base.html.tera +++ b/templates/base.html.tera @@ -3,20 +3,19 @@ - - - - {% block title %} - CódigoComentado - blog personal de kirbylife - {% endblock title %} - + + + {% block title %}CódigoComentado - blog personal de kirbylife{% endblock title %} + {% block seo_metadata %} - + + {% endblock seo_metadata %} + {% block extracss %} {% endblock extracss %} diff --git a/templates/post.html.tera b/templates/post.html.tera index 55e0936..1c06732 100644 --- a/templates/post.html.tera +++ b/templates/post.html.tera @@ -1,6 +1,16 @@ {% extends "base" %} {% block title %}CódigoComentado - {{post.title}}{% endblock title %} +{% block seo_metadata %} + + + + + + + +{% endblock seo_metadata %} + {% block extracss %} {% if post.content is containing("") %}