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

@ -5,12 +5,12 @@ permalink: /portfolio/
---
{% include base_path %}
{% include group-by-array collection=site.portfolio field='categories' %}
{% include group-by-array collection=site.portfolio field="categories" %}
{% for category in group_names %}
{% assign posts = group_items[forloop.index0] %}
<h2 id="{{ category | slugify }}" class="archive__subtitle">{{ category }}</h2>
{% for post in posts %}
{% include archive-list-single.html %}
{% include archive-single.html %}
{% endfor %}
{% endfor %}