{% set paramSocialMedia = getCoreToolsList("socialmedia") %}
{% set twitterSite = paramSocialMedia['twitter_site'] %}
{% set twitterCreator = paramSocialMedia['twitter_creator'] %}
{% set locale = paramSocialMedia['lang_HTML'] %}
{% set websitename = paramSocialMedia['websitename'] %}
{% set domain = paramSocialMedia['absolute_domain'] %}
{% set schema = paramSocialMedia['schema'] %}
{% set currentPath = app.request.uri %}
<meta property="og:site_name" content="{{ websitename }}" />
<meta property="og:locale" content="{{ locale }}" />
<meta property="og:type" content="{{ social_type }}" />
<meta property="og:title" content="{{ page.shortTitle }}" />
<meta property="og:url" content="{{ currentPath }}" />
<meta property="og:description" content="{{ page.shortDescription }}" />
{% if page.image is not null %}
{% set social_picture = domain ~ vich_uploader_asset(page, 'imageFile') %}
<meta property="og:image" content="{{ social_picture }}" />
<meta property="og:image:secure_url" content="{{ social_picture }}" />
{% if page.image.dimensions[0] is defined %}<meta property="og:image:width" content="{{ page.image.dimensions[0] }}" />{% endif %}
{% if page.image.dimensions[1] is defined %}<meta property="og:image:height" content="{{ page.image.dimensions[1] }}" />{% endif %}
{% endif %}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="{{ twitterSite }}" />
<meta name="twitter:creator" content="{{ twitterCreator }}" />
<meta name="twitter:title" content="{{ page.shortTitle }}" />
<meta name="twitter:description" content="{{ page.shortDescription }}">
{% if page.image is not null %}
<meta name="twitter:image" content="{{ social_picture }}" />
{% endif %}
{{ schema|raw }}