Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Adds og:image tags #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ owner:
# Background image to be tiled on all pages
background:

# Open Graph image to be used as a fallback when there are no images specified for a page/post
open_graph_image: avatar.jpg

# Analytics and webmaster tools stuff goes here
google_analytics:
google_verify:
Expand Down
3 changes: 3 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<meta property="og:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
<meta property="og:site_name" content="{{ site.title }}">
{% if page.image.facebook %}<meta property="og:image" content="{{ site.url }}/images/{{ page.image.facebook }}">{% endif %}
{% if page.image.feature %}<meta property="og:image" content="{{ site.url }}/images/{{ page.image.feature }}">{% endif %}
{% if page.image.feature == null and page.feature.facebook == null and site.open_graph_image != null %}<meta property="og:image" content="{{ site.url }}/images/{{ site.open_graph_image }}">{% endif %}

{% if site.google_verify %}<meta name="google-site-verification" content="{{ site.google_verify }}">{% endif %}
{% if site.bing_verify %}<meta name="msvalidate.01" content="{{ site.bing_verify }}">{% endif %}
Expand Down