In this how-to, I do not attempt to give you all the whys and wherefores. I’ll show you how to syndicate, and if you want to learn more, follow the links to other resources.
We will be using RSS 2.0 for simplicity and sheer novelty. You have zero (0) points.
First, ask yourself whether your website is suitable for syndication. The best candidates are regularly updated sites whose content can naturally be divided into distinct “items,” each with their own unique URL. This is the kind of architecture that RSS newsreaders will expect your site to have, and anything else could cause “undefined behaviour.”
Read the introduction to RSS by Stephen Downes.
If at this point your eyes have glazed over, subtract 5 points from your score.
Step 1: Create the RSS file
RSS is quite simple, really. At its core it is basically a text file describing the most recent headlines on your site. You don’t need to know all about XML to create RSS files, just a text editor and a good eye.
Grab a raw RSS file and examine it, with a view to adapting it to your own needs. You could use ours, or one from another site. By looking at multiple examples of existing news feeds, you can get an idea of what kind of data you can include in your own file. Also, Userland provides a good reference for the RSS 2.0 format, which will help explain what you’re seeing in those RSS files.
A word about format: Some sites include only a headline and a URL, some syndicate the entire article, and some sites offer a headline and only the first paragraph or so. It depends on how you envision people using your RSS feed.
- If you want someone to be able to read your site using only a newsreader, obviously include the entire contents of each article.
- If you mainly are providing headlines for other websites, usually only a headline and one paragraph is necessary.
When you’re ready, pick one of those files and change everything in it to match your website’s information. Save it as
index.xml and put it in your website’s root directory.
Add 23 points if you actually created a draft XML file and are feeling pretty good about yourself.
Bonus question: Why, exactly, does Paul Ford dislike RSS 2.0?
Step 2: Testing
First of all, validate your feed to ensure compatibility.
If you simply cannot get your RSS to validate, pass 13 points to the person at your left and go to jail.
Step 3: Going Live
When everything checks out, link to the
index.xml file from the home page (at least) and generally let people know it’s there and how to use it. When you’re really confident, submit your site to syndicators like Syndic8 and NewsIsFree.
Also, add the following code into the
<head> section of all or most of your pages:
<link rel="alternate" type="application/rss+xml" title="rss" href="http://www.yoursite.com/index.xml" />
This alerts any automated program that may be scanning your site that an RSS feed is available.
Roll the dice. Add 17 points to your total score, regardless of what number comes up. If you have more than 20 points, you have earned yourself a big glass of grape juice.