DRY up archive include
- Combine grid and list view into one include
This commit is contained in:
@ -9,7 +9,7 @@ author_profile: false
|
||||
{% 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 id="{{ label | slugify }}" class="archive__subtitle">{{ label }}</h2>
|
||||
@ -17,8 +17,8 @@ author_profile: false
|
||||
{% 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 %}
|
Reference in New Issue
Block a user