Skip to content

Commit 768e817

Browse files
committed
add date defaults
1 parent 8cd69f5 commit 768e817

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_includes/archive-single.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ <h2 class="archive__item-title" itemprop="headline">
3939
{% endif %}
4040

4141
{% if post.venue and post.date %}
42-
<p>Published in <i>{{ post.venue }}</i>, {{ post.date | date: "%Y" }} </p>
42+
<p>Published in <i>{{ post.venue }}</i>, {{ post.date | default: "1900-01-01" | date: "%Y" }} </p>
4343
{% 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="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time></p>
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="{{ page.date | date_to_xmlschema }}">{{ page.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
4545
{% endif %}
4646

4747
{% if post.excerpt %}

0 commit comments

Comments
 (0)