浏览代码

Use <time>

Chris Barrick 11 年之前
父节点
当前提交
35adf4b0ac
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      _layouts/default.html
  2. 2 2
      _layouts/post.html
  3. 1 1
      index.html

+ 1 - 1
_layouts/default.html

@@ -17,7 +17,7 @@
 
       <div class="footer">
         <p>
-          &copy; {{ site.time | date: '%Y' }}. All rights reserved.
+          &copy; <time datetime="{{ site.time | date_to_xmlschema}}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
         </p>
       </div>
     </div>

+ 2 - 2
_layouts/post.html

@@ -4,7 +4,7 @@ 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="page-date">{{ page.date | date_to_string }}</time>
   {{ content }}
 </article>
 
@@ -16,7 +16,7 @@ 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>

+ 1 - 1
index.html

@@ -12,7 +12,7 @@ title: Home
       </a>
     </h1>
 
-    <span class="post-date">{{ post.date | date_to_string }}</span>
+    <time datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date_to_string }}</time>
 
     {{ post.content }}
   </article>