Use header overlay images for Open Graph image

This commit is contained in:
Josh Habdas 2016-06-12 14:35:22 -05:00
parent b8934b19a9
commit beaaa884ff

View file

@ -85,6 +85,8 @@
{% if page.header.image %} {% if page.header.image %}
<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 %}
<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 %}">
{% endif %} {% endif %}
{% if page.date %} {% if page.date %}
@ -113,7 +115,7 @@
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context" : "http://schema.org", "@context" : "http://schema.org",
"@type" : "{% if site.social.type %}{{ site.social.type }}{% else %}person{% endif %}", "@type" : "{% if site.social.type %}{{ site.social.type }}{% else %}Person{% endif %}",
"name" : "{{ site.social.name | default: site.name }}", "name" : "{{ site.social.name | default: site.name }}",
"url" : {{ seo_url | jsonify }}, "url" : {{ seo_url | jsonify }},
"sameAs" : {{ site.social.links | jsonify }} "sameAs" : {{ site.social.links | jsonify }}