Use page.header.teaser instead of site.og_image in twitter:image and og:image meta tags (#466)
This commit is contained in:
parent
f52a18c3d8
commit
f173b97404
1 changed files with 7 additions and 1 deletions
|
@ -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 %}">
|
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<meta name="twitter:card" content="summary">
|
<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 }}">
|
<meta name="twitter:image" content="{{ site.og_image | prepend: "/images/" | prepend: base_path }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -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 %}">
|
<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 %}
|
{% 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 %}">
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.date %}
|
{% if page.date %}
|
||||||
|
|
Loading…
Reference in a new issue