Remove unsupported 'updated' flag from _includes/post/date.html

Jekyll does not support this value for Page or Post classes. The
capture returned an empty Sting, which was always evaluated to true
in '{% if updated %}'.
This commit is contained in:
Frederic Hemberger 2011-10-18 17:39:19 +02:00
parent c2a68cc2a9
commit 81e814a354
3 changed files with 5 additions and 11 deletions

View File

@ -1,13 +1,7 @@
{% capture date %}{{ page.date }}{{ post.date }}{% endcapture %} {% capture date %}{{ page.date }}{{ post.date }}{% endcapture %}
{% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %} {% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %}
{% capture has_date %}{{ date | size }}{% endcapture %} {% capture has_date %}{{ date | size }}{% endcapture %}
{% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %}
{% capture was_updated %}{{ updated | size }}{% endcapture %}
{% if has_date != '0' %} {% if has_date != '0' %}
{% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate {% if updated %} data-updated="true" {% endif %}>{{ date_formatted }}</time>{% endcapture %} {% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate>{{ date_formatted }}</time>{% endcapture %}
{% endif %} {% endif %}
{% if was_updated != '0' %}
{% capture updated %}<time class="updated" datetime="{{ updated | datetime | date_to_xmlschema }}">Updated {{ updated | ordinalize }}</time>{% endcapture %}
{% else %}{% assign updated = false %}{% endif %}

View File

@ -15,7 +15,7 @@ layout: default
<footer> <footer>
{% if page.date or page.author %}<p class="meta"> {% if page.date or page.author %}<p class="meta">
{% if page.author %}{% include post/author.html %}{% endif %} {% if page.author %}{% include post/author.html %}{% endif %}
{% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %} {% include post/date.html %}{{ time }}
{% if page.categories %}{% include post/categories.html %}{% endif %} {% if page.categories %}{% include post/categories.html %}{% endif %}
</p>{% endif %} </p>{% endif %}
{% unless page.sharing == false %} {% unless page.sharing == false %}

View File

@ -9,7 +9,7 @@ single: true
<footer> <footer>
<p class="meta"> <p class="meta">
{% include post/author.html %} {% include post/author.html %}
{% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %} {% include post/date.html %}{{ time }}
{% include post/categories.html %} {% include post/categories.html %}
</p> </p>
{% unless page.sharing == false %} {% unless page.sharing == false %}