Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into upstream
Browse files Browse the repository at this point in the history
* upstream/master:
  facebook sharing image meta tag added related mmistakes#149 issue
  Show related posts only when there are 1 or more
  • Loading branch information
oschrenk committed Jun 14, 2015
2 parents 4b36ca8 + 09fdd3c commit 8ce0862
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion _includes/_open-graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
{% if page.excerpt %}<meta property="og:description" content="{{ page.excerpt | strip_html }}">{% endif %}
<meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.url }}">
<meta property="og:site_name" content="{{ site.title }}">
<meta property="og:site_name" content="{{ site.title }}">
{% if page.image.feature %}
<meta property="og:image" content="{{ site.url }}/images/{{ page.image.feature }}">
{% else %}
<meta property="og:image" content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/default-thumb.png{% endif %}">
{% endif %}
2 changes: 2 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ <h1><a href="{{ site.url }}{{ page.url }}" rel="bookmark" title="{{ page.title }
</div><!-- /#main -->

<div class="footer-wrap">
{% if site.related_posts.size > 0 %}
<div class="related-articles">
<h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/posts/">View all posts</a>)</small></h4>
<ul>
Expand All @@ -64,6 +65,7 @@ <h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/post
</ul>
<hr />
</div><!-- /.related-articles -->
{% endif %}
<footer>
{% include _footer.html %}
</footer>
Expand Down

0 comments on commit 8ce0862

Please # to comment.