diff options
author | Frederic Hemberger <mail@frederic-hemberger.de> | 2011-10-18 17:25:31 +0200 |
---|---|---|
committer | Frederic Hemberger <mail@frederic-hemberger.de> | 2011-10-18 17:25:31 +0200 |
commit | c2a68cc2a980506b12b9054d5be8e4806fe79c1c (patch) | |
tree | f774b43e2d0da7b661ef2637d05461f614dcf2ec /.themes/classic | |
parent | ff7099207bc99edf9109f1b91f3e2aaf76560418 (diff) | |
download | my_new_personal_website-c2a68cc2a980506b12b9054d5be8e4806fe79c1c.tar.xz my_new_personal_website-c2a68cc2a980506b12b9054d5be8e4806fe79c1c.zip |
Make post's date output configurable via _config.yml, closes #164
A new config variable 'date_format' is introduced in _config.yml.
It can either be set to "ordinal" to use the current format or it
can be given a string complying to strftime() format identifiers.
Diffstat (limited to '.themes/classic')
-rw-r--r-- | .themes/classic/source/_includes/post/date.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.themes/classic/source/_includes/post/date.html b/.themes/classic/source/_includes/post/date.html index dbfa67ae..3fd702d7 100644 --- a/.themes/classic/source/_includes/post/date.html +++ b/.themes/classic/source/_includes/post/date.html @@ -1,10 +1,11 @@ {% capture date %}{{ page.date }}{{ post.date }}{% endcapture %} +{% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %} {% capture has_date %}{{ date | size }}{% endcapture %} {% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %} {% capture was_updated %}{{ updated | size }}{% endcapture %} {% if has_date != '0' %} - {% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate {% if updated %} data-updated="true" {% endif %}>{{ date | ordinalize }}</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' %} |