Sort projects by date.

master
Max Willsey 7 years ago
parent d5db768665
commit 6a98ae580e

@ -14,6 +14,7 @@ people:
- wolverine
layout: project
last-updated: 2015-05-05
---
Proin massa augue, eleifend non ultricies eget, feugiat ut nisl. Fusce at

@ -13,6 +13,7 @@ people:
layout: project
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Xmencomic-logo.svg/2000px-Xmencomic-logo.svg.png"
last-updated: 2017-04-11
---
Some preliminary text.

@ -15,4 +15,5 @@ people:
layout: project
no-link: true
last-updated: 2016-11-11
---

@ -46,7 +46,12 @@ role-tables:
<section>
<h2>Research</h2>
<div class="card-columns">
{% for p in site.projects %}
{% comment %}
Sort the projects by date, putting those without dates last
{% endcomment %}
{% assign projects_by_date = site.projects | sort: 'last-updated', 'first' %}
{% assign projects_by_date = projects_by_date | reverse %}
{% for p in projects_by_date %}
{% if p.status != "inactive" %}
{% include project-card.html project=p %}
{% endif %}

@ -4,7 +4,12 @@ title: Research Projects
---
<div class="card-columns">
{% for p in site.projects %}
{% comment %}
Sort the projects by date, putting those without dates last
{% endcomment %}
{% assign projects_by_date = site.projects | sort: 'last-updated', 'first' %}
{% assign projects_by_date = projects_by_date | reverse %}
{% for p in projects_by_date %}
{% include project-card.html project=p %}
{% endfor %}
</div>

Loading…
Cancel
Save