{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
{% if activeRoute == 'sas.frontend.blog.detail' and entry.media.url %}
{% set metaImage = entry.media.url|striptags|trim %}
{% endif %}
{% block layout_head_meta_tags %}
{% if activeRoute == 'sas.frontend.blog.detail' %}
<link rel="canonical" href="{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}"/>
{% endif %}
{{ parent() }}
{% endblock %}
{% block layout_head_meta_tags_image_og %}{{ metaImage ?? parent() }}{% endblock %}
{% block layout_head_meta_tags_image_twitter %}{{ metaImage ?? parent() }}{% endblock %}
{% block layout_head_meta_tags_image_meta %}{{ metaImage ?? parent() }}{% endblock %}
{% block layout_head_meta_tags_schema_webpage %}
{{ parent() }}
{% if activeRoute == 'sas.frontend.blog.detail' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "{{ entry.translated.title }}",
"datePublished": "{{ entry.publishedAt|date }}",
"dateModified": "{{ entry.updatedAt|date }}",
"description": "{{ entry.translated.teaser }}",
"author": {
"@type": "Person",
"name": "{{ entry.author.translated.name }}"
},
{% if entry.media.thumbnails.elements|length %}
"image":[{% for item in entry.media.thumbnails.elements %}"{{ item.url }}"{{ loop.last ? '' : ',' }}{% endfor %}],{% endif %}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}"
},
"publisher": {
"@type": "Organization",
"name": "{{ shopware.config.core.basicInformation.shopName }}",
"logo": {
"@type": "ImageObject",
"url": "{{ shopware.theme['sw-logo-desktop'] |sw_encode_url }}"
}
}
}
</script>
{% endif %}
{% endblock %}