Skip to content

Commit 3298fd2

Browse files
committed
fix teaching "Published in" bug
1 parent de3dc3c commit 3298fd2

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

_includes/archive-single.html

+8-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ <h2 class="archive__item-title" itemprop="headline">
3737
{% if post.read_time %}
3838
<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>
3939
{% endif %}
40-
41-
{% if post.venue and post.date %}
42-
<p>Published in <i>{{ post.venue }}</i>, {{ post.date | default: "1900-01-01" | date: "%Y" }} </p>
43-
{% elsif post.date %}
44-
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ post.date | default: "1900-01-01" | date_to_xmlschema }}">{{ post.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
45-
{% endif %}
40+
41+
{% if page.collection == 'teaching' %}
42+
<p> {{ page.type }}, <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
43+
{% elsif page.venue and page.date %}
44+
<p>Published in <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
45+
{% elsif page.date %}
46+
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ post.date | default: "1900-01-01" | date_to_xmlschema }}">{{ post.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
47+
{% endif %}
4648

4749
{% if post.excerpt %}
4850
<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify }}</p>

_layouts/single.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time></p>
3535
{% endif %}
3636

37-
{% if page.venue and page.date %}
37+
{% if page.collection == 'teaching' %}
38+
<p> {{ page.type }}, <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
39+
{% elsif page.venue and page.date %}
3840
<p>Published in <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
3941
{% elsif page.date %}
4042
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>

0 commit comments

Comments
 (0)