{# Post author #}
{% if post.blogAuthor %}
<meta name="author" content="{{ post.blogAuthor.fullName }}">
{% endif %}
{% if blogPost.filename %}
{% set post_image_url = vich_uploader_asset(blogPost, 'imageFile') | imagine_filter('blog_post_main') %}
{% endif %}
<meta property="og:type" content="article">
<meta property="og:title" content="{{ post.title }}">
<meta property="og:image" content="{{ post_image_url }}">
<meta property="article:published_time" content="{{ post.createdAt|date('Y-m-d') }}">
{% if post.metaCustom %}
{{ post.metaCustom|raw }}
{% endif %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"@id": "Article-{{ post.id }}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ app.request.getSchemeAndHttpHost ~ app.request.baseUrl ~ app.request.pathInfo }}"
},
"headline": "{{ post.metaTitle }}",
"description": "{{ post.metaDescription }}",
"image": "{{ post_image_url }}",
{% if post.blogAuthor %}
"author": {
"@type": "Person",
"name": "{{ post.blogAuthor.fullName }}"
},
{% endif %}
"publisher": {
"@type": "Organization",
"name": "Mon centre auditif",
"logo": {
"@type": "ImageObject",
"url": "https://mon-centre-auditif.com/build/mca_logo_horizontal.png"
}
},
"datePublished": "{{ post.createdAt|date('Y-m-d') }}",
"dateModified": "{{ post.updatedAt|date('Y-m-d') }}"
{% if post.metaSchema %}
,
{{ post.metaSchema[1:-1]|raw }}
{% endif %}
}
</script>