Moved everything out of the theme
This commit is contained in:
parent
347fe76db6
commit
f20fba6dbf
27 changed files with 4 additions and 6 deletions
37
source/_partials/og.html.twig
Normal file
37
source/_partials/og.html.twig
Normal 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 %}
|
Loading…
Add table
Add a link
Reference in a new issue