--- layout: default # TODO: add projects and pages to the archive - bound the date via `group_by_exp` --- {%-if page.type=='year'-%} {% assign date_format = '%Y'-%} {%-elsif page.type=='month'-%} {% assign date_format = '%B %Y'-%} {%-elsif page.type=='day'-%} {% assign date_format = '%B %-d, %Y'-%} {%-endif-%} {% assign formatted_date = page.date | date: date_format %} {% assign title = formatted_date | append: ' Archives' %} {%-assign projects = site.projects | where_exp: "project", "project.date == formatted_date" | where: "published", "true"-%} {%-assign pages = site.pages | where_exp: "pg", "pg.date == formatted_date" | where: "published", "true"-%}
{% include page_header.html page_title=title %}
{% include posts.html %} {% if projects != empty-%}

Projects {{ title-}}

{% include projects.html %} {%-endif-%} {% if pages != empty-%}

Pages {{ title-}}

{% include pages.html %} {%-endif-%}