Merge pull request #94 from dapenggao/patch-2
[blog] / _layouts / post.html
index c027477605b3b1ddaafaa876cc5efbea8044ef55..ec63afc10d770bfaf47daee2c3d2231ce39c8c05 100644 (file)
@@ -2,13 +2,14 @@
 layout: default
 ---
 
-<div class="post">
+<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 }}
-</div>
+</article>
 
-<div class="related">
+{% if site.related_posts != empty %}
+<aside class="related">
   <h2>Related Posts</h2>
   <ul class="related-posts">
     {% for post in site.related_posts limit:3 %}
@@ -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>
-</div>
+</aside>
+{% endif %}