Skip to content

Commit

Permalink
Use page.header.teaser instead of site.og_image in twitter:image and …
Browse files Browse the repository at this point in the history
…og:image meta tags (mmistakes#466)
  • Loading branch information
jluccisano committed Feb 12, 2017
1 parent fb89164 commit 20b0f50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion _includes/seo.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% else %}
<meta name="twitter:card" content="summary">
{% if site.og_image %}
{% if page.header.teaser %}
<meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% elsif site.og_image %}
<meta name="twitter:image" content="{{ site.og_image | prepend: "/images/" | prepend: base_path }}">
{% endif %}
{% endif %}
Expand All @@ -87,6 +89,10 @@
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% elsif page.header.overlay_image %}
<meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% elsif page.header.teaser %}
<meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% elsif site.og_image %}
<meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% endif %}

{% if page.date %}
Expand Down

0 comments on commit 20b0f50

Please # to comment.