{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
{% block layout_head_meta_tags %}
{% if activeRoute == 'sas.frontend.blog.detail' %}
<link rel="canonical" href="{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}" />
{% if entry.translated.metaTitle %}
{% set metaTitle = entry.translated.metaTitle|striptags|trim %}
{% else %}
{% set metaTitle = entry.translated.title|striptags|trim %}
{% endif %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block layout_head_meta_tags_description %}{% if activeRoute == 'sas.frontend.blog.detail' %}{% if entry.translated.metaDescription %}{{ entry.translated.metaDescription|striptags|trim }}{% else %}{{ entry.translated.teaser }}{% endif %}{% else %}{{ parent() }}{% endif %}{% endblock %}
{% block layout_head_title %}
{% if activeRoute == 'sas.frontend.blog.detail' %}
{% if entry.translated.metaTitle %}
{% set metaTitle = entry.translated.metaTitle|striptags|trim %}
{% else %}
{% set metaTitle = entry.translated.title|striptags|trim %}
{% endif %}
{% endif %}
{{ 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 %}