Applied Stephen's Microformats Patch

Christopher Vollick [2011-12-13 00:09]
Applied Stephen's Microformats Patch

Assuming he did it right, my site is now all microformatty.
Sweet.
Filename
default.tagindex.do
default.tagtemplate.do
index.html.do
diff --git a/default.tagindex.do b/default.tagindex.do
index f966fdc..f72444e 100644
--- a/default.tagindex.do
+++ b/default.tagindex.do
@@ -17,7 +17,7 @@ echo '</title>
 </head>
 <body>
 <div id="header">
-<h1> <a href="http://psycoti.ca/0/"> psycoti.ca/0/ </a> </h1>
+<h1> <a rel="home" href="http://psycoti.ca/0/"> psycoti.ca/0/ </a> </h1>
 </div>
 '

@@ -45,10 +45,14 @@ redo-ifchange "tagindex"
 grep "^$tag " < "tagindex" | cut -d ' ' -f 2- | tac | while read file; do
 	redo-ifchange "$file.converted"
 	title="$(./extract_headers "Title" < "$file.converted")"
-	echo '<li>'
-	echo "<h2> <a href='$file.html'>$title</a> </h2>"
+	echo '<li class="hentry">'
+	echo "<h2 class='entry-title'> <a rel='bookmark' href='$file.html'>$title</a> </h2>"
+
+	echo '<div class="entry-content">'
 	# Now spit out the body
 	sed '1,/^$/d' < "$file.converted"
+	echo '</div>'
+
 	echo '</li>'
 done

diff --git a/default.tagtemplate.do b/default.tagtemplate.do
index f232d23..badd192 100644
--- a/default.tagtemplate.do
+++ b/default.tagtemplate.do
@@ -30,7 +30,7 @@ echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3
 </head>
 <body>
 <div id=\"header\">
-<h1> <a href=\"http://psycoti.ca/0/\"> psycoti.ca/0/ </a> </h1>
+<h1> <a rel=\"home\" href=\"http://psycoti.ca/0/\"> psycoti.ca/0/ </a> </h1>
 </div>"
 echo "<div id=\"navigation\">"
 if [ -n "$prev" ]; then
@@ -45,22 +45,22 @@ echo "Tags:"
 echo "<ul>"
 for t in $tags; do
 	if [ "$t" = "$tag" ]; then
-		echo "<li class=\"current\"> <a href=\"index.html\"> $t </a> </li>"
+		echo "<li class=\"current\"> <a rel="index" href=\"index.html\"> $t </a> </li>"
 	else
 		echo "<li> <a href=\"../$t/index.html\"> $t </a> </li>"
 	fi
 done
 echo "</ul>"
 echo "</div>"
-echo "<div id=\"content\">"
-echo "<h1> $title </h1>
-$body"
+echo "<div id=\"content\" class=\"hentry\">"
+echo "<h1 class=\"entry-title\"> $title </h1>
+<div class=\"entry-content\">$body</div>"
 echo "<dl id=\"dates\">"
 if [ "$created" = "$modified" ]; then
-	echo "<dt> Published: </dt> <dd> $created </dd>"
+	echo "<dt> Published: </dt> <dd class=\"published\"> $created </dd>"
 else
-	echo "<dt> Originally Published: </dt> <dd> $created </dd>"
-	echo "<dt> Last Updated: </dt> <dd> $modified </dd>"
+	echo "<dt> Originally Published: </dt> <dd class=\"published\"> $created </dd>"
+	echo "<dt> Last Updated: </dt> <dd class=\"updated\"> $modified </dd>"
 fi
 echo "</dl>"
 echo "</div>
diff --git a/index.html.do b/index.html.do
index 46ac6f2..2da2f60 100644
--- a/index.html.do
+++ b/index.html.do
@@ -29,18 +29,18 @@ for t in $tags; do
 done
 echo "</ul></div>"

-echo '<div id="content">'
+echo '<div id="content" class="vcard">'

-echo '<img src="static/avatar.png" alt="avatar" class="avatar" />
-This is the website of Christopher Vollick.
+echo '<img src="static/avatar.png" alt="avatar" class="avatar photo" />
+This is the website of <span class="fn n"><span class="given-name">Christopher</span> <span class="family-name">Vollick</span></span>.
 <dl>
-<dt> GitHub: </dt> <dd> <a href="https://github.com/psycotica0"> https://github.com/psycotica0 </a> </dd>
-<dt> Email: </dt> <dd> <a href="mailto:0@psycoti.ca"> 0@psycoti.ca </a> </dd>
-<dt> Email: </dt> <dd> <a href="mailto:psycotica0@gmail.com"> psycotica0@gmail.com </a> </dd>
-<dt> XMPP: </dt> <dd> <a href="xmpp:0@psycoti.ca"> 0@psycoti.ca </a> </dd>
-<dt> XMPP: </dt> <dd> <a href="xmpp:psycotica0@gmail.com"> psycotica0@gmail.com </a> </dd>
-<dt> Identi.ca: </dt> <dd> <a href="http://identi.ca/psycotica0"> http://identi.ca/psycotica0 </a> </dd>
-<dt> Twitter: </dt> <dd> <a href="http://twitter.com/psycotica0"> http://twitter.com/psycotica0 </a> </dd>
+<dt> GitHub: </dt> <dd> <a class="url" rel="me" href="https://github.com/psycotica0"> https://github.com/psycotica0 </a> </dd>
+<dt> Email: </dt> <dd> <a class="email" href="mailto:0@psycoti.ca"> 0@psycoti.ca </a> </dd>
+<dt> Email: </dt> <dd> <a class="email" href="mailto:psycotica0@gmail.com"> psycotica0@gmail.com </a> </dd>
+<dt> XMPP: </dt> <dd> <a class="url" href="xmpp:0@psycoti.ca"> 0@psycoti.ca </a> </dd>
+<dt> XMPP: </dt> <dd> <a class="url" href="xmpp:psycotica0@gmail.com"> psycotica0@gmail.com </a> </dd>
+<dt> Identi.ca: </dt> <dd> <a class="url" rel="me" href="http://identi.ca/psycotica0"> http://identi.ca/psycotica0 </a> </dd>
+<dt> Twitter: </dt> <dd> <a class="url" rel="me" href="http://twitter.com/psycotica0"> http://twitter.com/psycotica0 </a> </dd>
 </dl>

 <p>
ViewGit