diff --git a/articles/context_processors.py b/articles/context_processors.py
index 5afecf8..a97a56b 100644
--- a/articles/context_processors.py
+++ b/articles/context_processors.py
@@ -23,7 +23,7 @@ def drafts_count(request):
def date_format(request):
if request.path in IGNORED_PATHS:
return {}
- return {"CUSTOM_ISO": r"Y-m-d\TH:i:sO"}
+ return {"CUSTOM_ISO": r"Y-m-d\TH:i:sO", "ISO_DATE": "Y-m-d"}
def git_version(request):
diff --git a/articles/templates/articles/article_list.html b/articles/templates/articles/article_list.html
index e34e829..2a72a68 100644
--- a/articles/templates/articles/article_list.html
+++ b/articles/templates/articles/article_list.html
@@ -9,11 +9,7 @@
{% for article in articles %}
-
- {% if article.published_at %}
-
- {% else %}
-
- {% endif %}
+ {% include "articles/datetime_snippet.html" %}
: {{ article.title }}
{% empty %}
diff --git a/articles/templates/articles/datetime_snippet.html b/articles/templates/articles/datetime_snippet.html
new file mode 100644
index 0000000..49322a8
--- /dev/null
+++ b/articles/templates/articles/datetime_snippet.html
@@ -0,0 +1,5 @@
+{% if article.published_at %}
+
+{% else %}
+
+{% endif %}
diff --git a/articles/templates/articles/metadata_snippet.html b/articles/templates/articles/metadata_snippet.html
index eed9e77..a336c41 100644
--- a/articles/templates/articles/metadata_snippet.html
+++ b/articles/templates/articles/metadata_snippet.html
@@ -1,9 +1,5 @@
{% load i18n %}
- {% if article.published_at %}
-
- {% else %}
-
- {% endif %}
+ {% include "articles/datetime_snippet.html" %}
{% include "articles/admin_link_snippet.html" %}