{% if post is defined and post is not empty %}
{% set social = getSocialByPost(post) %}
{% set googleTitle = post.title %}
{% set googleDescription = post.description %}
{% set googleTags = post.title %}
{% set facebookTitle = post.title %}
{% set facebookDescription = post.description %}
{% set facebookThumbnail = post.image %}
{% if social is not empty %}
{% if social.googleTitle is not empty %}
{% set googleTitle = social.googleTitle %}
{% endif %}
{% if social.googleTag is not empty %}
{% set googleTags = social.googleTag | join(',') %}
{% endif %}
{% if social.googleDescription is not empty %}
{% set googleDescription = social.googleDescription %}
{% endif %}
{% if social.facebookTitle is not empty %}
{% set facebookTitle = social.facebookTitle %}
{% endif %}
{% if social.facebookDescription is not empty %}
{% set facebookDescription = social.facebookDescription %}
{% endif %}
{% if social.facebookThumbnail is not empty %}
{% set facebookThumbnail = social.facebookThumbnail %}
{% endif %}
{% endif %}
<title>{{ googleTitle }}</title>
<meta name="title" content="{{ googleTitle }}">
<meta name="description" content="{{ googleDescription }}"/>
<meta name="keywords" content="{{ googleTags }}">
<meta property="og:locale" content="{{ app.request.get("_locale") }}">
<meta property="og:type" content="website"/>
<meta property="og:title" content="{{ facebookTitle }}"/>
<meta property="og:description" content="{{ facebookDescription }}"/>
<meta property="og:image" content="{{ assets.domain ~ facebookThumbnail }}"/>
{% endif %}
{% if category is defined and category is not empty %}
<title>{{ category.title }}</title>
{% endif %}