structured-data

This commit is contained in:
Jesús 2019-04-11 23:09:16 -05:00
parent 83d7c94539
commit 5240157115
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
3 changed files with 13 additions and 8 deletions

View File

@ -18,9 +18,11 @@
{{ translations.entry_hreflang(article) }}
{% endif %}
<meta property="og:title" content="{{ article.title }}">
<meta itemprop="name" content="{{ article.title }}">
<meta property="og:type" content="video.movie">
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}">
<meta property="video:release_date" content="{{ article.date.isoformat() }}">
<meta itemprop="uploadDate" content="{{ article.date.isoformat() }}">
{% if article.modified %}
<meta property="article:modified_time" content="{{ article.modified.isoformat() }}">
{% endif %}
@ -35,8 +37,10 @@
{% endif %}
{% endif %}
<meta property="og:description" content="{{ article.summary|striptags|escape }}"/>
<meta itemprop="description" content="{{ article.summary|striptags|escape }}"/>
{% if article.image %}
<meta property="og:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}"/>
<meta itemprop="thumbnailURL" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}">
{% elif OPEN_GRAPH_IMAGE %}
<meta property="og:image" content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}"/>
{% endif %}

View File

@ -9,7 +9,7 @@
{% set mes = article.date|strftime('%m') %}
{% set nombre_mes = article.date|strftime('%B') %}
<time class="entry-date published"
datetime="{{ article.date.isoformat() }}">
datetime="{{ article.date.isoformat() }}" itemprop="datePublished">
<small>
{{ article.date|strftime('%a %-d') }}
<a href="{{ SITEURL }}/archives/{{ año }}/{{ mes }}/"
@ -42,9 +42,10 @@
</svg>
</span>
{% for author in article.authors %}
<small>
<small itemprop="director" itemscope itemtype="http://schema.org/Person">
<a href="{{ SITEURL }}/{{ author.url }}"
title="{% trans %}Autor del artículo{% endtrans %}">{{ author }}</a>{% if not loop.last %}, {% endif %}
title="{% trans %}Autor del artículo{% endtrans %}"
itemprop="name">{{ author }}</a>{% if not loop.last %}, {% endif %}
</small>
{% endfor %}
{% endif %}

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}">
<head prefix="og: http://ogp.me/ns# {% if article %}article: http://ogp.me/ns/video#{% endif%}">
<head prefix="og: http://ogp.me/ns#{% if article %}article: http://ogp.me/ns/video#{% endif%}"{% if article %} itemscope itemtype="https://schema.org/VideoObject"{% endif %}>
{% block head %}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -117,7 +117,7 @@
<div class="row">
{% for article in articles_page.object_list %}
<article class="col-md-3 video">
<article class="col-md-3 video" itemscope itemtype="https://schema.org/Movie">
<a href="{{ SITEURL }}/{{ article.url }}">
<div class="area">
<div class="mask">
@ -130,9 +130,9 @@
</div> <!-- End Mask / Hover -->
{% if article.image %}
<img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}" alt="{{ article.title }}" class="img-fluid">
<img itemprop="image" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}" alt="{{ article.title }}" class="img-fluid">
{% else %}
<img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/video.png" alt="video" class="img-fluid">
<img itemprop="image" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/video.png" alt="video" class="img-fluid">
{% endif %}
{% if article.time %}
@ -144,7 +144,7 @@
</div> <!-- End Area -->
</a>
<h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ _('Ver %(articulo)s', articulo=article.title|striptags) }}">{{ article.title }}</a></h2>
<h2 itemprop="name"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ _('Ver %(articulo)s', articulo=article.title|striptags) }}">{{ article.title }}</a></h2>
<!-- post footer -->
{% include "article_info.html" %}