flex/templates/partial/jsonld_article.html
Sascha Wagner ad1ea4186d Strip tags from title in JSON-LD
(cherry picked from commit 0bb74527677de3163f9fa81d7320680b0f1adb91)
Signed-off-by: Sascha Wagner <sascha.wagner.89@gmail.com>
2016-02-02 08:56:47 +01:00

23 lines
742 B
HTML

{% if SITELOGO %}
{% set default_cover = SITELOGO %}
{% else %}
{% set default_cover = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png' %}
{% endif %}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"name": "{{ article.title|striptags }}",
"headline": "{{ article.title|striptags }}",
"datePublished": "{{ article.date }}",
"dateModified": "{{ article.modified }}",
"author": {
"@type": "Person",
"name": "{{ article.author.name }}",
"url": "{{ SITEURL }}/{{ article.author.url }}"
},
"image": "{{ article.metadata.get('cover', default_cover) }}",
"url": "{{ SITEURL }}/{{ article.url }}",
"description": "{{ article.summary|striptags }}"
}
</script>