improved the metadata to a better seo
parent
4a305dee02
commit
2eccb530ad
|
@ -142,7 +142,7 @@ fn write_edit_post(mut cookies: Cookies<'_>, id: i32, post: Form<NewPost>) -> 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")
|
||||
|
|
|
@ -3,13 +3,10 @@
|
|||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>
|
||||
{% block title %}
|
||||
CódigoComentado - blog personal de kirbylife
|
||||
{% endblock title %}
|
||||
</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>{% block title %}CódigoComentado - blog personal de kirbylife{% endblock title %}</title>
|
||||
{% block seo_metadata %}
|
||||
<meta name="description" content="CodigoComentado - Blog personal de kirbylife" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="twitter:card" value="summary">
|
||||
|
@ -17,6 +14,8 @@
|
|||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="https://codigocomentado.herokuapp.com" />
|
||||
<meta property="og:description" content="CodigoComentado - blog personal de kirbylife" />
|
||||
{% endblock seo_metadata %}
|
||||
|
||||
<link href="/static/css/base.css" rel="stylesheet"/>
|
||||
{% block extracss %}
|
||||
{% endblock extracss %}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{% extends "base" %}
|
||||
{% block title %}CódigoComentado - {{post.title}}{% endblock title %}
|
||||
|
||||
{% block seo_metadata %}
|
||||
<meta name="description" content="{{ post.content | split(path=" ") | slice(end=20) | join(sep=" ") }}" />
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="twitter:card" value="summary">
|
||||
<meta property="og:title" content="{{ post.title }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="https://codigocomentado.herokuapp.com" />
|
||||
<meta property="og:description" content="{{ post.content | split(path=" ") | slice(end=20) | join(sep=" ") }}" />
|
||||
{% endblock seo_metadata %}
|
||||
|
||||
{% block extracss %}
|
||||
<link href="/static/css/post.css" rel="stylesheet"/>
|
||||
{% if post.content is containing("<code>") %}
|
||||
|
|
Loading…
Reference in New Issue