From 3298fd2e3dba27389df95ddcd59e2a9418d5bec5 Mon Sep 17 00:00:00 2001 From: Stuart Geiger Date: Fri, 21 Jul 2017 13:39:35 -0700 Subject: [PATCH] fix teaching "Published in" bug --- _includes/archive-single.html | 14 ++++++++------ _layouts/single.html | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/_includes/archive-single.html b/_includes/archive-single.html index a10053d7a344b..73135f4703da4 100644 --- a/_includes/archive-single.html +++ b/_includes/archive-single.html @@ -37,12 +37,14 @@

{% if post.read_time %}

{% include read-time.html %}

{% endif %} - - {% if post.venue and post.date %} -

Published in {{ post.venue }}, {{ post.date | default: "1900-01-01" | date: "%Y" }}

- {% elsif post.date %} -

{{ site.data.ui-text[site.locale].date_label | default: "Published:" }}

- {% endif %} + + {% if page.collection == 'teaching' %} +

{{ page.type }}, {{ page.venue }}, {{ page.date | default: "1900-01-01" | date: "%Y" }}

+ {% elsif page.venue and page.date %} +

Published in {{ page.venue }}, {{ page.date | default: "1900-01-01" | date: "%Y" }}

+ {% elsif page.date %} +

{{ site.data.ui-text[site.locale].date_label | default: "Published:" }}

+ {% endif %} {% if post.excerpt %}

{{ post.excerpt | markdownify }}

diff --git a/_layouts/single.html b/_layouts/single.html index 3b22cbcfff9e6..6290cd24e6063 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -34,7 +34,9 @@

{{ site.data.ui-text[site.locale].date_label | default: "Published:" }}

{% endif %} - {% if page.venue and page.date %} + {% if page.collection == 'teaching' %} +

{{ page.type }}, {{ page.venue }}, {{ page.date | default: "1900-01-01" | date: "%Y" }}

+ {% elsif page.venue and page.date %}

Published in {{ page.venue }}, {{ page.date | default: "1900-01-01" | date: "%Y" }}

{% elsif page.date %}

{{ site.data.ui-text[site.locale].date_label | default: "Published:" }}