layout |
---|
default |
{%- assign this_name = page.name | split: "." -%} {%- assign this_category = this_name[0] | replace: '-date-sorted-reverse', '' -%} {%- assign this_pagetitle = this_category | capitalize | replace: '_', ' ' -%}
{%- comment -%}
- collecting the pages {%- endcomment -%}
{%- assign cat_posts = site.emptyArray -%} {%- for post in site.documents -%} {%- if post.categories contains this_category -%} {%- assign cat_posts = cat_posts | push: post -%} {%- endif -%} {%- endfor -%}
{%- assign cat_posts = cat_posts | sort: 'date' -%}
{%- comment -%}
- special posts for prepending content to the listing pages
- they are processed first, so separate loops are needed
{%- endcomment -%}
{%- for post in cat_posts -%} {%- if post.tags contains '.prepend' -%}
{%- comment -%}
- no separate treatment of featured posts {%- endcomment -%}
{%- assign today = site.time | date: '%Y%m%d' -%} {%- assign page_tag = this_category | downcase -%}
{%- for post in cat_posts -%} {% unless post.tags contains '.prepend' or post.tags contains '.append' %} {%- assign post_author = post.author | downcase -%} {%- assign excerpt_link = post.url | relative_url -%} {%- if post.excerpt_link contains '/' -%} {%- assign excerpt_link = post.excerpt_link -%} {%- endif -%} {%- assign post_day = post.date | date: '%Y%m%d' -%} {%- assign post_year = post.date | date: '%Y' -%} {%- if post_day > today -%} {%- assign post_year = 'Upcoming' -%} {%- endif %} {%- if current_year != post_year -%} {% assign current_year = post_year %}
{% endif %}{%- if post.author -%}{{ post.author | join: " | " }} {%- endif -%} {%- if post.date -%}{{ post.date | date: "%Y-%m-%d" }}: {% endif %} more ...
{%- for post in cat_posts -%} {%- if post.tags contains '.append' -%}