aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/source/_includes
diff options
context:
space:
mode:
authorFrederic Hemberger <mail@frederic-hemberger.de>2011-11-03 20:32:38 +0100
committerFrederic Hemberger <mail@frederic-hemberger.de>2011-11-03 20:32:38 +0100
commit987dccee7655a410a2fb1e0f41c35b282b17cbe9 (patch)
treef4924e26e9662a72d7f8e3c16245081cbf727432 /.themes/classic/source/_includes
parent262eb52bc58df8459ecf87d81627162bd7c3bc65 (diff)
downloadmy_new_personal_website-987dccee7655a410a2fb1e0f41c35b282b17cbe9.tar.xz
my_new_personal_website-987dccee7655a410a2fb1e0f41c35b282b17cbe9.zip
Add custom date format to pages, add 'updated' field again
Reverts changes of c2a68cc where I accidentally removed support for 'updated' field, see comments of issue #164 for details.
Diffstat (limited to '.themes/classic/source/_includes')
-rw-r--r--.themes/classic/source/_includes/post/date.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/.themes/classic/source/_includes/post/date.html b/.themes/classic/source/_includes/post/date.html
index 4fb570d2..ecf1ad71 100644
--- a/.themes/classic/source/_includes/post/date.html
+++ b/.themes/classic/source/_includes/post/date.html
@@ -2,6 +2,14 @@
{% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %}
{% capture has_date %}{{ date | size }}{% endcapture %}
+{% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %}
+{% capture updated_formatted %}{{ page.updated_formatted }}{{ post.updated_formatted }}{% endcapture %}
+{% capture was_updated %}{{ updated | size }}{% endcapture %}
+
{% if has_date != '0' %}
- {% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate>{{ date_formatted }}</time>{% endcapture %}
+ {% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate{% if updated %} data-updated="true"{% endif %}>{{ date_formatted }}</time>{% endcapture %}
{% endif %}
+
+{% if was_updated != '0' %}
+ {% capture updated %}<time datetime="{{ updated | datetime | date_to_xmlschema }}" class="updated">Updated {{ updated_formatted }}</time>{% endcapture %}
+{% else %}{% assign updated = false %}{% endif %} \ No newline at end of file