Improve SEO

This commit is contained in:
Jesús 2019-11-20 23:05:11 -05:00
parent 3b84a66708
commit 0c55be17bc
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
12 changed files with 292 additions and 219 deletions

View File

@ -1,57 +1,54 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block extra_head %} {% block head %}
<meta name="description" content="{{ _('Lista de artículos publicados en Conocimientos Libres.') }}"> {% block title %}
<meta name="keywords" content="{{ _('archivos,artículos,historia,lista de artículos') }}"> <title>{{ _('Archivos de') }} - {{ SITENAME }}</title>
{% endblock %}
<style> {{ super() }}
{% block seo %}
.content ul, .content ul ul, .content ul ul ul { <!-- Meta Archives -->
list-style:none !important; <meta name="description" content="{{ _('Lista de artículos publicados en Conocimientos Libres.') }}">
} <meta name="keywords" content="{{ _('archivos,artículos,historia,lista de artículos') }}">
<style>
.content ul { .content ul, .content ul ul, .content ul ul ul {
margin-left: 0px !important; list-style:none !important;
} }
.content ul {
.contenedor-arbol, .contenedor-arbol ul, .contenedor-arbol li { margin-left: 0px !important;
position: relative; }
margin: 0; .contenedor-arbol, .contenedor-arbol ul, .contenedor-arbol li {
padding-left: 2%; position: relative;
line-height: normal; margin: 0;
} padding-left: 2%;
line-height: normal;
.contenedor-arbol ul { }
list-style: none; .contenedor-arbol ul {
} list-style: none;
}
.contenedor-arbol li::before, .contenedor-arbol li::after { .contenedor-arbol li::before, .contenedor-arbol li::after {
content: ""; content: "";
position: absolute; position: absolute;
left: -12px; left: -12px;
} }
.contenedor-arbol li::before {
.contenedor-arbol li::before { border-top: 2px solid #111;
border-top: 2px solid #111; top: 9px;
top: 9px; width: 12px;
width: 12px; height: 0;
height: 0; }
} .contenedor-arbol li::after {
border-left: 2px solid black;
.contenedor-arbol li::after { height: 100%;
border-left: 2px solid black; width: 0px;
height: 100%; top: 2px;
width: 0px; }
top: 2px; .contenedor-arbol ul > li:last-child::after {
} height: 8px;
}
.contenedor-arbol ul > li:last-child::after { </style>
height: 8px; {% endblock %}
}
</style>
{% endblock %} {% endblock %}
{% block title %}{% trans %}Archivos de {{ SITENAME }}{% endtrans %}{% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<!-- start of posts --> <!-- start of posts -->

View File

@ -1,43 +1,15 @@
{# {% import 'pcs/comments.html' as pcs with context %} #}
{% extends "base.html" %} {% extends "base.html" %}
{% block html_lang %}{{ article.lang }}{% endblock %} {% block html_lang %}{{ article.lang }}{% endblock %}
{% block extra_head %}
<meta name="author" content="{{ article.author }}">
<meta name="keywords" content="{{ article.tags|join(',')|escape }}">
{% endblock %}
{% block head %} {% block head %}
{% block title %}
<title>{{ article.title }} - {{SITENAME}}</title>
{% endblock %}
{{ super() }} {{ super() }}
{% import 'translations.html' as translations with context %} {% import 'translations.html' as translations with context %}
{% if translations.entry_hreflang(article) %} {% if translations.entry_hreflang(article) %}
{{ translations.entry_hreflang(article) }} {{ translations.entry_hreflang(article) }}
{% endif %} {% endif %}
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta property="og:title" content="{{ article.title }}">
<meta property="og:type" content="article">
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}">
<meta property="article:published_time" content="{{ article.date.isoformat() }}">
{% if article.modified %}
<meta property="article:modified_time" content="{{ article.modified.isoformat() }}">
{% endif %}
<meta property="article:section" content="{{ article.category }}">
{% set OG_DESC_LENGTH = 175 %}
{% if og_description|length >= OG_DESC_LENGTH %}
{# Quita la última palabra para no dejarla incompleta #}
{% set og_description = og_description[:OG_DESC_LENGTH].split(' ')[:-1]|join(' ') %}
{% if not og_description[-1] in ['.', '?', ':', '!'] %}
{% set og_description = og_description + '…' %}
{% endif %}
{% endif %}
<meta property="og:description" content="{{ og_description }}">
{% if article.image %}
<meta property="og:image" content="{{ article.image.split('"')[1] }}">
{% endif %}
{% for tag in article.tags %}
<meta property="og:tag" content="{{ tag | escape }}">
{% endfor %}
{% if article.styles %} {% if article.styles %}
{% for style in article.styles %} {% for style in article.styles %}
@ -51,12 +23,45 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% block seo %}
{% set seo_description = article.summary|striptags %}
{% set SEO_DESC_LENGTH = 175 %}
{% if seo_description|length >= SEO_DESC_LENGTH %}
{# Quita la última palabra para no dejarla incompleta #}
{% set seo_description = seo_description[:SEO_DESC_LENGTH].split(' ')[:-1]|join(' ') %}
{% if not seo_description[-1] in ['.', '?', ':', '!'] %}
{% set seo_description = seo_description + '…' %}
{% endif %}
{% endif %}
<!-- Meta Article -->
<meta name="author" content="{{ article.author.name }}" />
<meta name="description" content="{{ seo_description }}" />
<meta name="keywords" content="{{ article.tags|join(', ') }}">
<meta property="article:author" content="{{ article.author }}" />
<meta property="article:section" content="{{ article.category }}" />
<meta property="article:published_time" content="{{ article.date.strftime("%Y-%m-%d-T%H-%M-%S") }}"/>
{% if article.modified %}
<meta property="article:modified_time" content="{{ article.modified.isoformat() }}">
{% endif %}
<!-- OpenGraph -->
<meta property="og:type" content="article"/>
<meta property="og:tag" content="{{ article.tags|join(',')|escape }}"/>
<meta property="og:title" content="{{ article.title }} - {{ SITENAME }}"/>
<meta property="og:description" content="{{ seo_description }}"/>
<meta property="og:site_name" content="{{ SITENAME }}"/>
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
<meta property="og:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}"/>
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ article.title }} - {{ SITENAME }}">
<meta name="twitter:description" content="{{ seo_description }}">
<meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}">
<meta name="twitter:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}">
{% endblock %}
{% endblock %} {% endblock %}
{% block title %}{{ article.title|striptags }}{% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<!-- start of posts --> <!-- start of posts -->
@ -116,49 +121,7 @@
</a> </a>
</div> </div>
<!-- post footer nav --> <!-- post footer nav -->
<div class="columns"> {% include 'article_info.html' %}
<div class="column has-text-left">
<a class="button is-small is-button-grey" href="{{ SITEURL }}/">{{ _('Regresar al Inicio') }}</a>
</div>
<div class="column has-text-right">
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" />
</svg>
</span>
{% set año = article.date|strftime('%Y') %}
{% set mes = article.date|strftime('%m') %}
{% set nombre_mes = article.date|strftime('%B') %}
<time class="entry-date published"
datetime="{{ article.date.isoformat() }}">
<small>
{{ article.date|strftime('%a %-d') }}
<a href="{{ SITEURL }}/archives/{{ año }}/{{ mes }}/"
title="{% trans %}Artículos de {{ nombre_mes }} de {{ año }}{% endtrans %}">
{{ nombre_mes }}
</a>
<a href="{{ SITEURL }}/archives/{{ año }}/"
title="{% trans %}Artículos de {{ año }}{% endtrans %}">{{ año }}
</a>
</small>
</time>
{% if not HIDE_AUTHORS and article.authors %}
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#user"/>
</svg>
</span>
{% for author in article.authors %}
<small>
<a href="{{ SITEURL }}/{{ author.url }}"
title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %}
</small>
{% endfor %}
{% endif %}
</div>
</div>
<!-- end of post footer nav --> <!-- end of post footer nav -->
</div> </div>
<!-- end of post footer --> <!-- end of post footer -->
@ -214,8 +177,9 @@
<p><strong>{{ comment.author }}</strong></p> <p><strong>{{ comment.author }}</strong></p>
{% endif %} {% endif %}
{{ comment.content }} {{ comment.content }}
<small><a href="{{ SITEURL }}/{{ article.url }}#comment-{{comment.slug}}">Permalink</a> <small><a href="{{ SITEURL }}/{{ article.url }}#comment-{{comment.slug}}" title='Permalink'>
| {{ comment.date }}</small> <abbr title='{{ comment.date|strftime("%Y-%m-%d-T%H-%M-%S") }}'>{{ _('Permalink') }}</abbr>
</a> | {{ comment.date|strftime("%H:%M:%S") }}</small>
</div> </div>
</div> </div>
<!-- end of comment content --> <!-- end of comment content -->

View File

@ -1,67 +1,56 @@
<!-- post footer --> <!-- post footer -->
<footer class="card-content-footer"> <footer class="columns">
<span class="soumaicon"> <div class="column has-text-left">
<svg> <a class="button is-small is-button-grey" href="{{ SITEURL }}/">{{ _('Regresar al Inicio') }}</a>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" /> </div>
</svg> <div class="column has-text-right">
</span>
{% set año = article.date|strftime('%Y') %}
{% set mes = article.date|strftime('%m') %}
{% set nombre_mes = article.date|strftime('%B') %}
<time class="entry-date published"
datetime="{{ article.date.isoformat() }}">
<small>
{{ article.date|strftime('%a %-d') }}
<a href="{{ SITEURL }}/archives/{{ año }}/{{ mes }}/"
title="{% trans %}Artículos de {{ nombre_mes }} de {{ año }}{% endtrans %}">
{{ nombre_mes }}
</a>
<a href="{{ SITEURL }}/archives/{{ año }}/"
title="{% trans %}Artículos de {{ año }}{% endtrans %}">{{ año }}
</a>
</small>
</time>
{% if article.modified %}
<span class="soumaicon"> <span class="soumaicon">
<svg> <svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" /> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" />
</svg> </svg>
</span> </span>
<span class="edit-link" {% set año = article.date|strftime('%Y') %}
title="{{ _('Fecha de modificación') }}"> {% set mes = article.date|strftime('%m') %}
<small class="screen-reader-text">{{ _('Modificado el %(fecha)s'|format(fecha='</small> {% set nombre_mes = article.date|strftime('%B') %}
<time class="updated" datetime="%s"><small>%s</small></time>')|format(article.modified.isoformat(), article.locale_modified)) }} <time class="entry-date published"
</span> datetime="{{ article.date.isoformat() }}">
{% endif %}
{% if not HIDE_AUTHORS and article.authors %}
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#user" />
</svg>
</span>
{% for author in article.authors %}
<small> <small>
<a href="{{ SITEURL }}/{{ author.url }}" {{ article.date|strftime('%a %-d') }}
title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %} <a href="{{ SITEURL }}/archives/{{ año }}/{{ mes }}/"
title="{% trans %}Artículos de {{ nombre_mes }} de {{ año }}{% endtrans %}">
{{ nombre_mes }}
</a>
<a href="{{ SITEURL }}/archives/{{ año }}/"
title="{% trans %}Artículos de {{ año }}{% endtrans %}">{{ año }}
</a>
</small> </small>
{% endfor %} </time>
{% endif %}
{% import 'translations.html' as translations with context %} {% if not HIDE_AUTHORS and article.authors %}
{% if translations.translations_for(article) %} <span class="soumaicon">
<span class="soumaicon"> <svg>
<svg> <use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#user"/>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#translate" /> </svg>
</svg> </span>
</span> {% for author in article.authors %}
<small> <small>
{{ translations.translations_for(article) }} <a href="{{ SITEURL }}/{{ author.url }}"
</small> title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %}
{% else %} </small>
{% endif %} {% endfor %}
{% endif %}
{% import 'translations.html' as translations with context %}
{% if translations.translations_for(article) %}
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#translate" />
</svg>
</span>
<small>
{{ translations.translations_for(article) }}
</small>
{% else %}
{% endif %}
</div>
</footer> </footer>
<!-- end of post footer -->
<!-- /.post-info -->

View File

@ -1,6 +1,10 @@
{% extends "index.html" %} {% extends "index.html" %}
{% block extra_head %} {% block title %}
<title>{{ _('Artículos escritos por %(author)s en %(sitename)s', author=author, sitename=SITENAME) }}</title>
{% endblock %}
{% block seo %}
<!-- Meta Author -->
<meta name="author" content="{{ author }}"> <meta name="author" content="{{ author }}">
<meta name="description" content="{% trans %}Artículos escritos por {{ author }} en Conocimientos Libres.{% endtrans %}"> <meta name="description" content="{% trans %}Artículos escritos por {{ author }} en Conocimientos Libres.{% endtrans %}">
<meta name="keywords" content="{% trans %}articulista,artículos,author,autor {{ author }},escritor,{{ author }}{% endtrans %}"> <meta name="keywords" content="{% trans %}articulista,artículos,author,autor {{ author }},escritor,{{ author }}{% endtrans %}">
@ -11,8 +15,6 @@
</style> </style>
{% endblock %} {% endblock %}
{% block title %}{{ SITENAME }} - {{ author }}{% endblock %}
{% block content %} {% block content %}
<div class="card-content-header"> <div class="card-content-header">
<h4 class="title is-4 has-text-centered">{% trans %}Autor: {{ author }}{% endtrans %}</h4> <h4 class="title is-4 has-text-centered">{% trans %}Autor: {{ author }}{% endtrans %}</h4>

View File

@ -1,11 +1,24 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block extra_head %} {% block head %}
<meta name="description" content="{{ _('Lista de autores de Conocimientos Libres.') }}"> {% block title %}<title>{{ _('Autores de') }} {{ SITENAME }}</title>{% endblock %}
<meta name="keywords" content="{{ _('articulistas,autores,colaboradores,escritores,lista de autores') }}"> {{ super() }}
{% endblock %} {% block seo %}
<meta name="description" content="{{ _('Lista de autores de Conocimientos Libres.') }}">
<meta name="keywords" content="{{ _('articulistas, autores, colaboradores, escritores, lista de autores') }}">
{% block title %}{% trans %}Autores de {{ SITENAME }}{% endtrans %}{% endblock %} <!-- OpenGraph -->
<meta property="og:type" content="article"/>
<meta property="og:title" content="{{ _('Lista de autores de Conocimientos Libres.') }}"/>
<meta property="og:description" content="{{ SITESUBTITLE }}"/>
<meta property="og:site_name" content="{{ SITENAME }}" />
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ _('Lista de autores de Conocimientos Libres.') }}">
<meta name="twitter:description" content="{{ SITESUBTITLE }}">
{% endblock %}
{% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">

View File

@ -2,21 +2,12 @@
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}"> <html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}">
<head prefix="og: http://ogp.me/ns# {% if article %}article: http://ogp.me/ns/article#{% endif%}"> <head prefix="og: http://ogp.me/ns# {% if article %}article: http://ogp.me/ns/article#{% endif%}">
{% block head %} {% block head %}
<!-- Meta Base -->
<meta charset="UTF-8"/> <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 %}{{ SITENAME }}{% endblock title %}</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<!-- Metas --> <meta name="HandheldFriendly" content="True"/>
{% block extra_head %}
{% set SITE_DESCRIPTION = _('Sitio web que trata temas diversos relacionados con la libertad, como la cultura libre y el software libre.') %}
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="{{ SITE_DESCRIPTION }}">
<meta name="keywords" content="{{ _('software libre,libertad,libertad de expresión,privacidad,formación,tutoriales,guías,GNU/Linux,desarrollo web,Hyperbola') }}">
<meta property="og:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-96x96.png">
<meta property="og:title" content="{{ SITENAME }}">
<meta property="og:type" content="website">
<meta property="og:url" content="{{ SITEURL }}">
<meta property="og:description" content="{{ SITE_DESCRIPTION }}">
{% endblock %}
<!-- stylesheets --> <!-- stylesheets -->
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bulma.css?v=0.7.4"> <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bulma.css?v=0.7.4">
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/hover.css"> <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/hover.css">
@ -176,7 +167,7 @@
</div> </div>
<!-- post footer --> <!-- post footer -->
{% include "article_info.html" %} {% include "base_info.html" %}
<!-- end of post footer --> <!-- end of post footer -->
</div> </div>
<!-- end of post content --> <!-- end of post content -->

View File

@ -0,0 +1,67 @@
<!-- post footer -->
<footer class="card-content-footer">
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" />
</svg>
</span>
{% set año = article.date|strftime('%Y') %}
{% set mes = article.date|strftime('%m') %}
{% set nombre_mes = article.date|strftime('%B') %}
<time class="entry-date published"
datetime="{{ article.date.isoformat() }}">
<small>
{{ article.date|strftime('%a %-d') }}
<a href="{{ SITEURL }}/archives/{{ año }}/{{ mes }}/"
title="{% trans %}Artículos de {{ nombre_mes }} de {{ año }}{% endtrans %}">
{{ nombre_mes }}
</a>
<a href="{{ SITEURL }}/archives/{{ año }}/"
title="{% trans %}Artículos de {{ año }}{% endtrans %}">{{ año }}
</a>
</small>
</time>
{% if article.modified %}
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#calendar" />
</svg>
</span>
<span class="edit-link"
title="{{ _('Fecha de modificación') }}">
<small class="screen-reader-text">{{ _('Modificado el %(fecha)s'|format(fecha='</small>
<time class="updated" datetime="%s"><small>%s</small></time>')|format(article.modified.isoformat(), article.locale_modified)) }}
</span>
{% endif %}
{% if not HIDE_AUTHORS and article.authors %}
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#user" />
</svg>
</span>
{% for author in article.authors %}
<small>
<a href="{{ SITEURL }}/{{ author.url }}"
title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %}
</small>
{% endfor %}
{% endif %}
{% import 'translations.html' as translations with context %}
{% if translations.translations_for(article) %}
<span class="soumaicon">
<svg>
<use href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/master.svg#translate" />
</svg>
</span>
<small>
{{ translations.translations_for(article) }}
</small>
{% else %}
{% endif %}
</footer>
<!-- end of post footer -->
<!-- /.post-info -->

View File

@ -1,15 +1,35 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block extra_head %} {% block head %}
{% block title %}
<title>{{ SITENAME }}{% if articles_page.number != 1 %} | {{ _('Página') }} {{ articles_page.number }}{% endif %}</title>
{% endblock %}
{{ super() }} {{ super() }}
{% if lang_siteurls and articles_page.number == 1 %} {% if lang_siteurls and articles_page.number == 1 %}
{% for lang, url in lang_siteurls.items() %} {% for lang, url in lang_siteurls.items() %}
<link rel="alternate" hreflang="{{ lang }}" href="{{ url }}/"> <link rel="alternate" hreflang="{{ lang }}" href="{{ url }}/">
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% block seo %}
<!-- Meta Index -->
<meta name="author" content="{{ AUTHOR }}" />
<meta name="description" content="{{ SITENAME }} &ndash; {{ SITESUBTITLE }}">
<!-- OpenGraph -->
<meta property="og:title" content="{{ SITENAME }}" />
<meta property="og:description" content="{{ SITESUBTITLE }}" />
<meta property="og:url" content="{{ SITEURL }}" />
<meta property="og:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-96x96.png"/>
<meta property="og:type" content="blog"/>
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ SITENAME }}">
<meta name="twitter:description" content="{{ SITESUBTITLE }}">
<meta name="twitter:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/favicon/cl-favicon-96x96.png">
{% endblock %}
{% endblock %} {% endblock %}
{% block title %}{{ SITENAME }}{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %}
{% block sitename %} {% block sitename %}
<h1 class="title is-1 is-spaced">{{ SITENAME }}</h1> <h1 class="title is-1 is-spaced">{{ SITENAME }}</h1>
<h4 class="subtitle is-4">{{ SITESUBTITLE }}</h4> <h4 class="subtitle is-4">{{ SITESUBTITLE }}</h4>

View File

@ -2,17 +2,14 @@
{% block html_lang %}{{ page.lang }}{% endblock%} {% block html_lang %}{{ page.lang }}{% endblock%}
{% block extra_head %} {% block head %}
{% block title %}
<title>{{ page.title }} - {{SITENAME}}</title>
{% endblock %}
{% import 'translations.html' as translations with context %} {% import 'translations.html' as translations with context %}
{% if translations.entry_hreflang(page) %} {% if translations.entry_hreflang(page) %}
{{ translations.entry_hreflang(page) }} {{ translations.entry_hreflang(page) }}
{% endif %} {% endif %}
<meta name="author" content="{{ author }}">
{% endblock %}
{% block title %}{{ page.title }}{% endblock %}
{% block head %}
{{ super() }} {{ super() }}
{% if page.styles %} {% if page.styles %}
{% for style in page.styles %} {% for style in page.styles %}
@ -26,6 +23,24 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% block seo %}
<!-- Meta Page -->
<meta name="description" content="{{ SITENAME }} &ndash; {{ SITESUBTITLE }}">
<meta name="author" content="{{ page.author }}">
<!-- OpenGraph -->
<meta property="og:type" content="article"/>
<meta property="og:title" content="{{ page.title }}"/>
<meta property="og:description" content="{{ SITESUBTITLE }}"/>
<meta property="og:site_name" content="{{ SITENAME }}" />
<meta property="og:url" content="{{ SITEURL }}/{{ page.url }}"/>
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ page.title }}">
<meta name="twitter:description" content="{{ SITESUBTITLE }}">
<meta name="twitter:url" content="{{ SITEURL }}/{{ page.url }}">
{% endblock %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
@ -79,7 +94,7 @@
</a> </a>
</div> </div>
<!-- post footer nav --> <!-- post footer nav -->
<div class="columns"> <footer class="columns">
<div class="column has-text-left"> <div class="column has-text-left">
<a class="button is-small is-button-grey" href="{{ SITEURL }}/">{{ _('Regresar al Inicio') }}</a> <a class="button is-small is-button-grey" href="{{ SITEURL }}/">{{ _('Regresar al Inicio') }}</a>
</div> </div>
@ -96,7 +111,7 @@
</small> </small>
{% endif %} {% endif %}
</div> </div>
</div> </footer>
<!-- end of post footer nav --> <!-- end of post footer nav -->
</div> </div>
<!-- end of post footer --> <!-- end of post footer -->

View File

@ -1,5 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block head %}
{% block title %}
{% set len_period = period|length %}
{%- if len_period == 1 -%}
<title>{{ _('Archivos de %(año)d', año=period[0]) }} - {{SITENAME}}</title>
{%- elif len_period == 2 -%}
<title>{{ _('Archivos de %(mes)s de %(año)d', año=period[0], mes=period[1]) }} - {{SITENAME}}</title>
{%- elif len_period == 3 -%}
<title>{{ _('Archivos del %(dia)d de %(mes)s de %(año)d', año=period[0], mes=period[1], dia=period[2]) }} - {{SITENAME}}</title>
{%- endif -%}
{% endblock %}
{{ super() }}
{% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<!-- start of posts --> <!-- start of posts -->

View File

@ -27,7 +27,7 @@ if(empty($_POST['name']) ||
header( "Location: {$return_url}"); header( "Location: {$return_url}");
} else { } else {
$DATE_FORMAT = "Y-m-d H:i"; $DATE_FORMAT = "Y-m-d H:i:s";
$publish = date($DATE_FORMAT); $publish = date($DATE_FORMAT);
$name = strip_tags(utf8_decode(htmlspecialchars($_POST['name']))); $name = strip_tags(utf8_decode(htmlspecialchars($_POST['name'])));

View File

@ -50,6 +50,7 @@ COMMENTS_DIR = ['comments']
SITENAME = 'Conocimientos Libres' SITENAME = 'Conocimientos Libres'
SITENAME_SINGLE = 'CL' SITENAME_SINGLE = 'CL'
SITEURL = 'https://conocimientoslibres.tuxfamily.org' SITEURL = 'https://conocimientoslibres.tuxfamily.org'
AUTHOR = 'Jesús E.'
# URL settings # URL settings
# https://docs.getpelican.com/en/stable/settings.html#url-settings # https://docs.getpelican.com/en/stable/settings.html#url-settings