Skip to content

Commit

Permalink
Remove unsupported 'updated' flag from _includes/post/date.html
Browse files Browse the repository at this point in the history
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 %}'.
  • Loading branch information
fhemberger committed Oct 18, 2011
1 parent c2a68cc commit 81e814a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
8 changes: 1 addition & 7 deletions .themes/classic/source/_includes/post/date.html
@@ -1,13 +1,7 @@
{% 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_formatted }}</time>{% endcapture %}
{% capture time %}<time datetime="{{ date | datetime | date_to_xmlschema }}" pubdate>{{ date_formatted }}</time>{% endcapture %}
{% 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 %}
2 changes: 1 addition & 1 deletion .themes/classic/source/_layouts/page.html
Expand Up @@ -15,7 +15,7 @@ <h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% el
<footer>
{% if page.date or page.author %}<p class="meta">
{% 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 %}
</p>{% endif %}
{% unless page.sharing == false %}
Expand Down
6 changes: 3 additions & 3 deletions .themes/classic/source/_layouts/post.html
Expand Up @@ -9,17 +9,17 @@
<footer>
<p class="meta">
{% include post/author.html %}
{% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}
{% include post/date.html %}{{ time }}
{% include post/categories.html %}
</p>
{% unless page.sharing == false %}
{% include post/sharing.html %}
{% endunless %}
<p class="meta">
{% if page.previous.url %}
{% if page.previous.url %}
<a class="basic-alignment left" href="{{page.previous.url}}" title="Previous Post: {{page.previous.title}}">&laquo; {{page.previous.title}}</a>
{% endif %}
{% if page.next.url %}
{% if page.next.url %}
<a class="basic-alignment right" href="{{page.next.url}}" title="next Post: {{page.next.title}}">{{page.next.title}} &raquo;</a>
{% endif %}
</p>
Expand Down

0 comments on commit 81e814a

Please sign in to comment.