<dl>
-{% if maxPosts %}
- {% set numPosts = collections.activities | length | min(maxPosts) %}
- {% set activitieslist = collections.activities | reverse | head(numPosts) %}
+{% if page.filePathStem === "/articles" %}
+ {% set activitiescollection = collections.articles %}
+{% elseif page.filePathStem === "/links" %}
+ {% set activitiescollection = collections.links %}
+{% elseif page.filePathStem === "/reviews" %}
+ {% set activitiescollection = collections.reviews %}
{% else %}
- {% set activitieslist = collections.activities | reverse %}
+ {% set activitiescollection = collections.activities %}
{% endif %}
+
+{% set numPosts = maxPosts | default(activitiescollection | length) %}
+{% set activitieslist = activitiescollection | reverse | head(numPosts) %}
+
{%- for item in activitieslist %}
<dt><a href="{{ item.url }}">{{ item.data.title }}</a></dt>
<dd>
- {% if "articles" in item.data.tags %}
- <small class="collectiontag">article</small>
- {% elseif "reviews" in item.data.tags %}
- <small class="collectiontag">review</small>
- {% elseif "links" in item.data.tags %}
- <small class="collectiontag">link</small>
+ {% set tag = false %}
+ {% if page.filePathStem === "/links" %}
+ {% if "livestream" in item.data.tags %}
+ {% set tag = "livestream" %}
+ {% elseif "podcast" in item.data.tags %}
+ {% set tag = "podcast" %}
+ {% endif %}
+ {% elseif page.filePathStem === "/reviews" %}
+ {% if "movie" in item.data.tags %}
+ {% set tag = "movie" %}
+ {% elseif "music" in item.data.tags %}
+ {% set tag = "music" %}
+ {% elseif "show" in item.data.tags %}
+ {% set tag = "show" %}
+ {% endif %}
+ {% else %}
+ {% if "articles" in item.data.tags %}
+ {% set tag = "article" %}
+ {% elseif "reviews" in item.data.tags %}
+ {% set tag = "review" %}
+ {% elseif "links" in item.data.tags %}
+ {% set tag = "link" %}
+ {% endif %}
+ {% endif %}
+
+ {% if tag %}
+ <small class="collectiontag">{{ tag }}</small>
{% endif %}
{{ item.data.description }}
</dd>
+++ /dev/null
-<dl>
-{% if maxPosts %}
- {% set numPosts = collections.articles | length | min(maxPosts) %}
- {% set articleslist = collections.articles | reverse | head(numPosts)%}
-{% else %}
- {% set articleslist = collections.articles | reverse %}
-{% endif %}
-{%- for article in articleslist %}
- <dt><a href="{{ article.url }}">{{ article.data.title }}</a></dt>
- <dd>{{ article.data.description }}</dd>
-{%- endfor %}
-</dl>
\ No newline at end of file
+++ /dev/null
-<dl>
-{% if maxPosts %}
- {% set numPosts = collections.links | length | min(maxPosts) %}
- {% set linkslist = collections.links | reverse | head(numPosts) %}
-{% else %}
- {% set linkslist = collections.links | reverse %}
-{% endif %}
-{%- for link in linkslist %}
- <dt><a href="{{ link.url }}">{{ link.data.title }}</a></dt>
- <dd>
- {% if "livestream" in link.data.tags %}
- <small class="collectiontag">livestream</small>
- {% elseif "podcast" in link.data.tags %}
- <small class="collectiontag">podcast</small>
- {% endif %}
- {{ link.data.description }}
- </dd>
-{%- endfor %}
-</dl>
\ No newline at end of file
+++ /dev/null
-<dl>
-{% if maxPosts %}
- {% set numPosts = collections.reviews | length | min(maxPosts) %}
- {% set reviewslist = collections.reviews | reverse | head(numPosts) %}
-{% else %}
- {% set reviewslist = collections.reviews | reverse %}
-{% endif %}
-{%- for review in reviewslist %}
- <dt><a href="{{ review.url }}">{{ review.data.title }}</a></dt>
- <dd>
- {% if "movie" in review.data.tags %}
- <small class="collectiontag">movie</small>
- {% elseif "music" in review.data.tags %}
- <small class="collectiontag">music</small>
- {% elseif "show" in review.data.tags %}
- <small class="collectiontag">show</small>
- {% endif %}
- {{ review.data.description }}
- </dd>
-{%- endfor %}
-</dl>
\ No newline at end of file