templates/front/partials/social.html.twig line 1

Open in your IDE?
  1. <meta property="og:title" content="{% if page.ogTitle is defined and page.ogTitle is not null %}{{ page.ogTitle }}{% else %}{{ page.title|remove_highlight_word  | default(settings('siteName')) }}{% endif %}" />
  2.     <meta property="og:description" content="{% if page.ogDescription is defined and page.ogDescription is not null %}{{ page.ogDescription | striptags }}{% else %}{{ page.description | striptags  | default(settings('siteDescription')) }}{% endif %}" />
  3.     <meta property="og:url" content="{{ app.request.uri }}" />
  4.     {% if settings('facebookAppId') != '' and settings('facebookAppId') is not null %}<meta property="fb:app_id" content="{{ settings('facebookAppId') }}"/>{% endif %}
  5. {% if page.ogType is defined and page.ogType is not null %}
  6.     <meta property="og:type" content="{{ page.ogType}}" />
  7.     {% if page.ogType == 'article' %}
  8.         <meta property="og:published_time" content="{{ page.created | date('c')}}" />
  9.         <meta property="og:modified_time" content="{{ page.updated | date('c')}}" />
  10.         <meta property="og:author" content="{{ page.author.fullName }}" />
  11.     {% endif %}
  12. {% else %}
  13. <meta property="og:type" content="website" />
  14. {% endif %}
  15. {% if page.ogImage.singleMedia.publicId is defined and page.ogImage.singleMedia.publicId is not null %}
  16. <meta property="og:image" content="{{ app.request.scheme }}:{{ cloudinary_media(page.ogImage.singleMedia, 'c_fill,h_630,q_70,w_1200') }}" />
  17.     <meta property="og:image:type" content="image/jpeg" />
  18.     <meta property="og:image:width" content="1200" />
  19.     <meta property="og:image:height" content="630" />
  20.     <meta property="og:image:alt" content="{{ page.ogImage.singleMedia.title | default('') }}" />
  21. {% elseif settings('siteImage').singleMedia.publicId is defined and settings('siteImage').singleMedia.publicId is not null %}
  22.     <meta property="og:image" content="{{ app.request.scheme }}:{{ cloudinary_media(settings('siteImage').singleMedia, 'c_fill,h_630,q_70,w_1200') }}" />
  23.     <meta property="og:image:type" content="image/jpeg" />
  24.     <meta property="og:image:width" content="1200" />
  25.     <meta property="og:image:height" content="630" />
  26.     <meta property="og:image:alt" content="{{ settings('siteImage').singleMedia.title | default('') }}" />
  27. {% endif %}
  28. <meta property="og:site_name" content="{{ settings('siteName')}}" />
  29. <meta name="twitter:card" content="{% if page.twitterCard is defined and page.twitterCard is not null %}{{ page.twitterCard }}{% else %} summary {% endif %}" />
  30. <meta name="twitter:title" content="{% if page.twitterTitle is defined and page.twitterTitle is not null %}{{ page.twitterTitle }}{% else %}{{ page.title|remove_highlight_word  | default(settings('siteName')) }}{% endif %}" />
  31. <meta name="twitter:description" content="{% if page.twitterDescription is defined and page.twitterDescription is not null %}{{ page.twitterDescription | striptags }}{% else %}{{ page.description | striptags  | default(settings('siteDescription')) }}{% endif %}"/>
  32. {% if page.twitterImage.singleMedia.publicId is defined and page.twitterImage.singleMedia.publicId is not null %}
  33.     <meta name="twitter:image:src" content="{{ app.request.scheme }}:{{ cloudinary_media(page.twitterImage.singleMedia, 'c_fill,h_630,q_70,w_1200') }}" />
  34. {% else %}
  35.     <meta name="twitter:image:src" content="{{ app.request.scheme }}:{{ cloudinary_media(settings('siteImage').singleMedia, 'c_fill,h_630,q_70,w_1200') }}" />
  36. {% endif %}