DRY up archive include

- Combine grid and list view into one include
This commit is contained in:
Michael Rose
2016-03-19 20:58:17 -04:00
parent da90ccaf49
commit 109f4ffb44
16 changed files with 75 additions and 76 deletions

View File

@ -11,18 +11,18 @@ A list of all the posts and pages found on the site. For you robots out there is
<h2>Pages</h2>
{% for post in site.pages %}
{% include archive-list-single.html %}
{% include archive-single.html %}
{% endfor %}
<h2>Posts</h2>
{% for post in site.posts %}
{% include archive-list-single.html %}
{% include archive-single.html %}
{% endfor %}
{% capture written_label %}'None'{% endcapture %}
{% for collection in site.collections %}
{% unless collection.output == false or collection.label == 'posts' %}
{% unless collection.output == false or collection.label == "posts" %}
{% capture label %}{{ collection.label }}{% endcapture %}
{% if label != written_label %}
<h2>{{ label }}</h2>
@ -30,8 +30,8 @@ A list of all the posts and pages found on the site. For you robots out there is
{% endif %}
{% endunless %}
{% for post in collection.docs %}
{% unless collection.output == false or collection.label == 'posts' %}
{% include archive-list-single.html %}
{% unless collection.output == false or collection.label == "posts" %}
{% include archive-single.html %}
{% endunless %}
{% endfor %}
{% endfor %}