{%-comment-%} lists pages as section cards given a pages array inputs: none dependencies: pages: the pages array to render site.static_files: to lookup and make sure a placeholder.png file exists site.show.authors: to determine whether to show authors site.show.page_authors: to determine whether to show authors site.people: to lookup authors in the people array site.title: to use as the author, as a last resort local: published_pages: pages filtered for `published==true` placeholder: placeholder.png file to use in case no other page image is available auth: the author's handle, used for unpublished authors in place of their name author: the looked-up author in site.people {%-endcomment-%} {%-assign published_pages = pages | where: 'published', true-%} {%-if published_pages != empty %} {%-for pg in published_pages %}
{% if image or placeholder.name-%}
{% include item_image.html-%}
{%-include categories.html %}
{%-endif %}
{%-assign modified_date = pg.modified_date | default: pg.last_modified_at-%} {%-if modified_date-%} {% include date_modified.html item_date=modified_date lead_in='last modified: '-%} {%-endif %}
{% include item_date.html item_date=pg.date %}

{{-pg.title-}}

{{-pg.subtitle-}}

{%-if site.show.page_authors and site.show.authors and pg.author or pg.location %} {%-endif-%}
{% if include.summary or pg.summary or pg.excerpt-%}
{{ include.summary | default: pg.summary | default: pg.excerpt | markdownify }}
{%-endif %} {%-include tags.html %}

{% endfor %} {% else %}

Oof!

It looks like there aren't any published pages here yet. Might you bug the site owner to create one for your look-see?

{% endif %}