DRY up archive include
- Combine grid and list view into one include
This commit is contained in:
@ -6,12 +6,12 @@ author_profile: false
|
||||
---
|
||||
|
||||
{% include base_path %}
|
||||
{% include group-by-array collection=site.posts field='tags' %}
|
||||
{% include group-by-array collection=site.posts field="tags" %}
|
||||
|
||||
{% for tag in group_names %}
|
||||
{% assign posts = group_items[forloop.index0] %}
|
||||
<h2 id="{{ tag | slugify }}" class="archive__subtitle">{{ tag }}</h2>
|
||||
{% for post in posts %}
|
||||
{% include archive-list-single.html %}
|
||||
{% include archive-single.html %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user