Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MiteshShah committed Aug 8, 2015
1 parent fe6afcd commit d02b3dd
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions _layouts/post-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,13 @@
{% include _ads.html %}
<br>
<h1>{{ page.title }}</h1>
{% capture written_year %}'None'{% endcapture %}
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% if year != written_year %}
<h3>{{ year }}</h3>
{% capture written_year %}{{ year }}{% endcapture %}
{% endif %}
<article>
{% if post.link %}
<h2 class="link-post"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></a></h2>
Expand Down

0 comments on commit d02b3dd

Please # to comment.