Use .twig instead of .html.twig

This commit is contained in:
Oliver Davies 2015-08-20 23:30:25 +01:00
parent 91e76cad66
commit 3465efe014
11 changed files with 2 additions and 2 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="@opdavies"/>
{% else %}
<meta name="twitter:card" content="summary"/>
{% endif %}
<meta name="twitter:title" content="{{ og.title|raw }}"/>
<meta name="twitter:description" content="{{ og.description|raw }}"/>
<meta name="twitter:site" content="@opdavies"/>
{% endif %}