updated metadata for pages and posts

This commit is contained in:
Brandon Mathis 2011-09-04 14:19:10 -05:00
parent f9d4c1916e
commit 97948fcbdd
6 changed files with 10 additions and 8 deletions

View File

@ -6,7 +6,7 @@
<h1 class="entry-title">{{ page.title | titlecase }}</h1> <h1 class="entry-title">{{ page.title | titlecase }}</h1>
{% endif %} {% endif %}
{% unless page.meta == false %} {% unless page.meta == false %}
<p class="meta">{% include post/date.html %}</p> <p class="meta">{% include post/date.html %}{{ time }}</p>
{% endunless %} {% endunless %}
</header> </header>
{% endunless %} {% endunless %}

View File

@ -4,7 +4,7 @@
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]--> <!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{% if page.title %}{{page.title}} « {% endif %}{{site.title}}</title> <title>{% if page.title %}{{page.title}} - {% endif %}{{site.title}}</title>
<meta name="author" content="{{site.author}}"> <meta name="author" content="{{site.author}}">
{% if page.description %} {% if page.description %}
<meta name="description" content="{{page.description}}"/> <meta name="description" content="{{page.description}}"/>

View File

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

View File

@ -13,7 +13,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 %} {% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}
{% 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

@ -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 %} {% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}
{% 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 %} {% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}
{% include post/categories.html %} {% include post/categories.html %}
</p> </p>
{% unless page.sharing == false %} {% unless page.sharing == false %}