DRY up archives by using an include

This commit is contained in:
Michael Rose
2016-03-05 21:29:39 -05:00
parent 8e838e1062
commit 0a4c90e031
7 changed files with 14 additions and 44 deletions

View File

@@ -16,10 +16,7 @@ permalink: /collection-archive/
{% endunless %}
{% for post in collection.docs %}
{% unless collection.output == false or collection.label == 'posts' %}
<article itemscope itemtype="http://schema.org/CreativeWork">
<h2 itemprop="headline"><a href="{{ absurl }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
{% if post.excerpt %}<p itemprop="description">{{ post.excerpt | markdownify | strip_html | strip_newlines | escape_once }}</p>{% endif %}
</article>
{% include post-single.html %}
{% endunless %}
{% endfor %}
{% endfor %}