From 6a98ae580ed79123aa09746fa9e311d1f2df6a8a Mon Sep 17 00:00:00 2001 From: Max Willsey Date: Tue, 28 Nov 2017 09:45:19 -0800 Subject: [PATCH] Sort projects by date. --- _projects/a-project.md | 1 + _projects/logo-project.md | 1 + _projects/longer-project.md | 1 + index.html | 7 ++++++- research.html | 7 ++++++- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/_projects/a-project.md b/_projects/a-project.md index f110dd7..ac9e5c8 100644 --- a/_projects/a-project.md +++ b/_projects/a-project.md @@ -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 diff --git a/_projects/logo-project.md b/_projects/logo-project.md index 3f73a8c..69481ed 100644 --- a/_projects/logo-project.md +++ b/_projects/logo-project.md @@ -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. diff --git a/_projects/longer-project.md b/_projects/longer-project.md index 84644d5..1e8edc4 100644 --- a/_projects/longer-project.md +++ b/_projects/longer-project.md @@ -15,4 +15,5 @@ people: layout: project no-link: true +last-updated: 2016-11-11 --- diff --git a/index.html b/index.html index 3874128..1d42d97 100644 --- a/index.html +++ b/index.html @@ -46,7 +46,12 @@ role-tables:

Research

- {% 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 %} diff --git a/research.html b/research.html index 9a4dc40..c8ba483 100644 --- a/research.html +++ b/research.html @@ -4,7 +4,12 @@ title: Research Projects ---
- {% 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 %}