Change to .twig

This commit is contained in:
Oliver Davies 2017-01-29 08:10:10 +00:00
parent d10dba6f4b
commit a14175689c
34 changed files with 0 additions and 0 deletions

37
source/_partials/og.twig Normal file
View file

@ -0,0 +1,37 @@
{% if og.title %}
<meta property="og:title" content="{{ og.title|raw }}"/>
{% endif %}
{% if og.description %}
<meta property="og:description" content="{{ og.description|raw }}"/>
{% endif %}
{% if og.type %}
<meta property="og:type" content="{{ og.type }}"/>
{% endif %}
{% if og.image and og.image.url %}
<meta property="og:image" content="{{ og.image.url }}"/>
{% if og.image.type %}
<meta property="og:image:type" content="{{ og.image.type }}"/>
{% endif %}
{% if og.image.width %}
<meta property="og:image:width" content="{{ og.image.width }}"/>
{% endif %}
{% if og.image.height %}
<meta property="og:image:height" content="{{ og.image.height }}"/>
{% endif %}
{% endif %}
{% if og.title %}
{% if og.image %}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image:src" content="{{ og.image.url }}">
<meta name="twitter:creator" content="@{{ site.twitter.name }}"/>
{% else %}
<meta name="twitter:card" content="summary"/>
{% endif %}
<meta name="twitter:title" content="{{ og.title|raw }}"/>
<meta name="twitter:text:description" content="{{ og.description|raw }}"/>
<meta name="twitter:site" content="@{{ site.twitter.name }}"/>
{% endif %}