Prefix site.url to meta image URLs

This commit is contained in:
Oliver Davies 2017-04-21 10:22:52 +01:00
parent be330bdb4d
commit c91ae89e95
2 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@
{% endif %}
{% if og.image and og.image.url %}
<meta property="og:image" content="{{ og.image.url }}"/>
<meta property="og:image" content="{{ site.url }}{{ og.image.url }}"/>
{% if og.image.type %}
<meta property="og:image:type" content="{{ og.image.type }}"/>
{% endif %}
@ -26,7 +26,7 @@
{% 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:image:src" content="{{ site.url }}{{ og.image.url }}">
<meta name="twitter:creator" content="@{{ site.twitter.name }}"/>
{% else %}
<meta name="twitter:card" content="summary"/>

View file

@ -14,7 +14,7 @@ meta:
og:
title: Getting Started with Drupal 8 Module Development
image:
url: 'https://www.oliverdavies.uk/assets/images/talks/dclondon16.png'
url: /assets/images/talks/dclondon16.png
type: 'image/png'
height: 540
width: 960