Friday, 9 May 2008

How I built my personal website in 10 easy steps

  1. Download RSS Toolkit from CodePlex: http://www.codeplex.com/ASPNETRSSToolkit
  2. Identify the data about me that I want to mix into one place.
  3. Make a list of the RSS feeds that are available for that data.
  4. Setup a simple Yahoo Pipe that unions all of my RSS feeds of interest into one RSS feed.
  5. Get the single RSS feed and pump it into an RSSDataSource.
  6. Bind that RssDataSource to a simple ASP.Net Repeater.
  7. Setup the RSS Toolkit Caching using the application settings suggested here.
  8. Revamp website design using templates from the Open Source Web Design templates library.
  9. Remove old administration code used for Blogger, Flickr and Youtube.
  10. Publish, and see results of Ben Powell's new website.
And, now for some code:



   1:  <%@ OutputCache Duration="86400" VaryByParam="None" %>

   2:  <%@ Register Assembly="RssToolkit" Namespace="RssToolkit.Web.WebControls" TagPrefix="cc1" %>

   3:  <asp:Repeater ID="Repeater1" runat="server" DataSourceID="RssDataSource1">

   4:      <ItemTemplate>

   5:          <h2><%# Eval("title") %></h2>

   6:          <%# Eval("description") %>

   7:          <br />

   8:          <a href='<%# Eval("link") %>'>Link</a>

   9:      </ItemTemplate>

  10:  </asp:Repeater>

  11:  <cc1:RssDataSource id="RssDataSource1" runat="server" url="http://pipes.yahoo.com/pipes/pipe.run?_id=_&lt;your pipe id>&_render=rss" MaxItems="10"></cc1:RssDataSource>

0 comments: