M _includes/_head.html => _includes/_head.html +8 -1
@@ 4,7 4,14 @@
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
{% if site.owner.twitter %}<!-- Twitter Cards -->
{% if page.image.feature %}<meta name="twitter:card" content="summary_large_image">
-<meta name="twitter:image" content="{{ site.url }}/images/{{ page.image.feature }}">
+<meta name="twitter:image" content=
+ {% if page.image.feature contains 'http://' %}
+ "{{ page.image.feature }}"
+ {% elsif page.image.feature contains 'https://' %}
+ "{{ page.image.feature }}"
+ {% else %}
+ "{{ site.url }}/images/{{ page.image.feature }}">
+ {% endif %}
{% else %}<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/{{ site.logo }}{% endif %}">{% endif %}
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">