Skip to content

Commit

Permalink
Fix blank site.teaser bug
Browse files Browse the repository at this point in the history
- Use `assign` instead of capture and then check if variable is `nil` or not.
- Close #412
  • Loading branch information
mmistakes committed Aug 1, 2016
1 parent 262d99b commit 1510d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if post.header.teaser %}
{% capture teaser %}{{ post.header.teaser }}{% endcapture %}
{% else %}
{% capture teaser %}{{ site.teaser }}{% endcapture %}
{% assign teaser = site.teaser %}
{% endif %}

{% if post.id %}
Expand All @@ -14,7 +14,7 @@

<div class="{{ include.type | default: "list" }}__item">
<article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
{% if include.type == "grid" and teaser != blank %}
{% if include.type == "grid" and teaser %}
<div class="archive__item-teaser">
<img src=
{% if teaser contains "://" %}
Expand Down

0 comments on commit 1510d52

Please sign in to comment.