Monday, February 4

XFN and Blogger Templates

Inspired by Google’s new Social Graph API (yay, bradfitz!), I’ve added XFN annotations to my blog template for the “Elsewhere” and “Friend’s Blogs” link lists, as well as my Blogger profile link.

This is pretty easy to do in Blogger. Just edit your template’s HTML and click the “Expand Widget Templates” checkbox. Then, look for the templates for the link lists you want:
<b:widget id='LinkList2' locked='false'
title='Friends’ Blogs' type='LinkList'>
<b:includable id='main'>
<b:if cond='data:title'><h2><data:title/></h2></b:if>
<div class='widget-content'>
<b:loop values='data:links' var='link'>
<li><a expr:href=''><></a></li>
<b:include name='quickedit'/>
Then, inside that <a> tag, just add: rel="friend" or rel="me".

You can use the Social Graph API’s Site Connectivity demo to check the output, though it’ll take a bit of time (I’m not sure how long) until the data is crawled.