Merge pull request #94 from dapenggao/patch-2
[blog] / _layouts / post.html
index bcf449df2ef724f720df1da7c5a7afecb0a50dfd..ec63afc10d770bfaf47daee2c3d2231ce39c8c05 100644 (file)
@@ -4,10 +4,11 @@ layout: default
 
 <article class="post">
   <h1 class="post-title">{{ page.title }}</h1>
-  <span class="post-date">{{ page.date | date_to_string }}</span>
+  <time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time>
   {{ content }}
 </article>
 
+{% if site.related_posts != empty %}
 <aside class="related">
   <h2>Related Posts</h2>
   <ul class="related-posts">
@@ -16,10 +17,11 @@ layout: default
         <h3>
           <a href="{{ site.baseurl }}{{ post.url }}">
             {{ post.title }}
-            <small>{{ post.date | date_to_string }}</small>
+            <small><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time></small>
           </a>
         </h3>
       </li>
     {% endfor %}
   </ul>
 </aside>
+{% endif %}