Merge pull request #44 from cbarrick/html5
authorMark Otto <markd.otto@gmail.com>
Fri, 26 Sep 2014 04:40:46 +0000 (21:40 -0700)
committerMark Otto <markd.otto@gmail.com>
Fri, 26 Sep 2014 04:40:46 +0000 (21:40 -0700)
Better HTML 5 semantics

_layouts/default.html
_layouts/page.html
_layouts/post.html
index.html

index 87ee3eb730a66b6a33adae77ef270bf5159b4ff6..62aa2596157b7e96fec80cd05840613812d4a02b 100644 (file)
@@ -6,20 +6,22 @@
   <body>
 
     <div class="container content">
-      <div class="masthead">
+      <header class="masthead">
         <h3 class="masthead-title">
           <a href="{{ site.baseurl }}" title="Home">{{ site.title }}</a>
           <small>{{ site.tagline }}</small>
         </h3>
-      </div>
+      </header>
 
-      {{ content }}
+      <main>
+        {{ content }}
+      </main>
 
-      <div class="footer">
-        <p>
-          &copy; {{ site.time | date: '%Y' }}. All rights reserved.
-        </p>
-      </div>
+      <footer class="footer">
+        <small>
+          &copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
+        </small>
+      </footer>
     </div>
 
   </body>
index 4e0d4ebf09ee2756cfc8c0087e0a3d73be00cc2f..960f76780ca93aae8a2943ab9ba51aa5d31dd29c 100644 (file)
@@ -2,7 +2,7 @@
 layout: default
 ---
 
-<div class="page">
+<article class="page">
   <h1 class="page-title">{{ page.title }}</h1>
   {{ content }}
-</div>
+</article>
index c027477605b3b1ddaafaa876cc5efbea8044ef55..576bba8579931e47237c9ae51243365787765121 100644 (file)
@@ -2,13 +2,13 @@
 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="page-date">{{ page.date | date_to_string }}</time>
   {{ content }}
-</div>
+</article>
 
-<div class="related">
+<aside class="related">
   <h2>Related Posts</h2>
   <ul class="related-posts">
     {% for post in site.related_posts limit:3 %}
@@ -16,10 +16,10 @@ 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>
index edbc6b1ff9da7e18c5a14341956ca515537f8cea..ff6de99ff908c1645a22bbaff5bdbeb93bbf4bcb 100644 (file)
@@ -5,17 +5,17 @@ title: Home
 
 <div class="posts">
   {% for post in paginator.posts %}
-  <div class="post">
+  <article class="post">
     <h1 class="post-title">
       <a href="{{ post.url }}">
         {{ post.title }}
       </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 }}
-  </div>
+  </article>
   {% endfor %}
 </div>