RSS for Goodthatway.com

Getting Started with RSS

Recently I discovered goodthatway, a tech news site whose tagline is “better living through better technology”. I suggested that the site offer an RSS feed to help people keep up with the latest links and stories. Scott from goodthatway was interested in the details, so I’ve put together this article with some details.

There are a lot of different choices and options when assembling an RSS feed for your site. The path I’ve taken here is but one way to do it.

Looking at goodthatway.com, it appears to be the perfect site for RSS. The home page lists a series of stories, each with a title, summary, and link to the main article. These will fit easily into an RSS feed that should be automatically updated whenever a new story is published to the site.

There are many flavors of RSS; I would recommend going with RSS 2.0 which has a minimal amount of required fields but is extensible.

Basically, the RSS feed consists of the element which includes a title, link, description, language, and copyright elements. Following that, one or more elements would appear (by convention, they would be listed in reverse chronological order).

Each consists of a title, link, and description. In the example below I’ve also included an encoded content field, the name of the author, and the publish date for the story. (The content:encoded, dc:creator, and dc:date elements are all extensions to the base RSS 2.0.)

Some points to consider:

  • By convention, you’d probably call this file rss.xml and locate it at the root of the web site
  • Any links present in the items should be fully specified rather than relative (e.g., http://goodthatway.com/news\_arc/?id=33 rather than /news\_arc/?id=33. Relative links work fine with a web browser but RSS aggregators usually cannot determine the correct URL
  • The items should be listed in reverse chronological order; most sites would limit the number to something like 10 to keep the RSS file size from growing too large
  • There is a tradeoff between posting full news stories or just excepts; for my site I post the excerpt in the <description> element and the full content in the <content:encoded> element; either way, make sure to have a good excerpt listed in the description field — titles alone are usually not enough
  • The <dc:date> element must be published in the ISO8601 standard format; if the tool being used to generate this format can’t be made to publish in this format, the field can be eliminated or the standard RSS element <pubDate> could be used
  • By convention, no field should have HTML entities; the exception would be content:encoded which in this example is escaped by \[CDATA\[...\]\]
  • The entire file must be valid XML, so upper-ASCII characters must be escaped appropriately
  • It’s good practice to periodically check the feed against the Feed Validator

Following is a sample RSS 2.0 file using data from goodthatway.com: `\

<br /> goodthatway<br />

http://goodthatway.com/ goodthatway is a web site devoted to usable, useful technology. en-us Copyright � 2003 goodthatway

<item>
  <title>Companies Unite To Create "Smart Home" Standards</title>
  <link>http://goodthatway.com/news\_arc/?id=34</link>
  <description>Recently, the formation of the Digital Home Working Group was announced.  The DHWG is a non-profit organization dedicated to the simplified sharing of digital content, such as digital music, photos and video, among networked consumer electronics (CE), mobile devices, and PCs.</description>
  <content:encoded><!\[CDATA\[Recently, the formation of the <a href="http://www.dhwg.org">Digital Home Working Group</a> was announced
  ... edited for length ...
  that won't require a mortgage payment.\]\]></content:encoded>
  <dc:creator>Will Provost</dc:creator>
  <dc:date>2003-07-23T12:47:00-05:00</dc:date>
</item>
<item>
  <title>Fuji Develops Wi-Fi Digital Camera</title>
  <link>http://goodthatway.com/news\_arc/?id=33</link>
  <description>Illustrating how Wi-Fi (in this case 802.11b, specifically) has been successfully expanding it presence beyond the mere PC, Fuji Photo Film recently unveiled a new digital camera prototype that uses Wi-Fi networks to allow easier access to printers and personal computers.</description>
  <dc:creator>Will Provost</dc:creator>
  <dc:date>2003-07-20T01:30:00-05:00</dc:date>
</item>

Once the feed is constructed, the site should include a link on their home page, possibly using the orange XML feed icon or the phrase "syndicate this site". There is also a convention for automatically finding the RSS feed: simply update the main index page to include the following in the HTML <head> section: `\ Once the RSS feed is up and running, subscribe to it with any News Aggregator and double-check everything. (See the
News Aggregator Directory at hebig.org for starters.)

Sample goodthatway.com feed shown in NewsDesk (http://www.wildgrape.net/)

Further reading about RSS:

Posted in: Web