diff --git a/_pages/posts.md b/_pages/posts.md index 7195455..8ea9bc1 100644 --- a/_pages/posts.md +++ b/_pages/posts.md @@ -10,22 +10,22 @@ permalink: /posts/
- {% for post in site.posts %} - {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} - {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} - {% if forloop.first %}{{ this_year }}{% endif %} - {% unless forloop.last %} - {% if this_year != next_year %}{{ next_year }}{% endif %} - {% endunless %} - {% endfor %} + {% for post in site.posts -%} + {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture -%} + {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture -%} + {% if forloop.first %}{{ this_year }}{% endif -%} + {% unless forloop.last -%} + {% if this_year != next_year %}{{ next_year }}{% endif -%} + {% endunless -%} + {% endfor -%}
- {% for post in site.posts %} - {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} - {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} - {% if forloop.first %} + {% for post in site.posts -%} + {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture -%} + {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture -%} + {% if forloop.first -%}

{{ this_year }}

- {% endif %} + {% endif -%}
{{ post.title }} @@ -37,14 +37,14 @@ permalink: /posts/ - {% if forloop.last %} + {% if forloop.last -%}
- {% else %} - {% if this_year != next_year %} + {% else -%} + {% if this_year != next_year -%}

{{ next_year }}

- {% endif %} - {% endif %} - {% endfor %} + {% endif -%} + {% endif -%} + {% endfor -%}
diff --git a/_pages/tags.md b/_pages/tags.md index 6de6eea..438f0d4 100644 --- a/_pages/tags.md +++ b/_pages/tags.md @@ -10,11 +10,11 @@ permalink: /tags/
- {% for tag in site.tags %} + {% for tag in site.tags -%} {{ tag[0] }} {% endfor %}
- {% for tag in site.tags %} + {% for tag in site.tags -%}

{{ tag[0] }}

- {% for post in tag[1] %} + {% for post in tag[1] -%}
{{ post.title }}