During the last few weeks I have received several requests around RSS. One was for a tutorial that could be pointed to so that others could set-up fully-featured RSS feeds on their site. And the second was to provide a comment-less version of my feed (so you’d only see my feed as new if I’d posted new messages).
This piece will cover both of these, just because I’m so damned nice.
Note: This piece is in draft format. I have most of it done, except for the end RSS templates. If you want to contribute to this to help this process along, please do. Otherwise, it’ll take me a few weeks to get this list of 20+ templates completed. Thanks for your patience.
But, first some of the basics. If you want to skip the basics and get right into the feeds, or how to build yours, here are some shortcuts to jump there:
What Does this Primer Cover?
What is RSS?
What problem does RSS Solve?
How Does RSS Work in MovableType?
A Simple RSS File
RSS Feed List
RSS Versions
Example Full Feed
The Templates
Resources
What Does this Primer Cover?
This primer is targetted, mainly, at MovableType users, only because that’s all I have available to me. The RSS feeds I post will cover any blogging system which supports RSS, you’ll just need to put your own system’s variables in. If someone emails me updated templates for other systems, I will post them.
back to top
What is RSS?
At the risk of being overly brief, RSS is an XML standard which allows blogs to publish posts in such a way that news readers and aggregators can present them in a friendly way to users.
One important thing to remember with RSS is that the versions (0.91, 1.0, 2.0) do not indicate the newest and best. It’s confusing, but you’re generally fine if you pick one and stick with it (1.0 or 2.0 being the most popular).
A full history and great article can be found here, written by Mark Pilgrim.
back to top
What problem does RSS Solve?
If you have ever tried to keep up with what’s happening on more than 5 blogs on a regular basis, or if you’ve ever tried to keep up with the news, you know that the thing you do more than anything else is scan for new stories. RSS, combined with a solid news reader solves this problem. Instead of looking for it, you are told when there are new stories.
back to top
How Does RSS Work in MovableType?
Whenever new entries are published, a series of “index” files are updated in MovableType. One of these is your RSS feed. If you log into MovableType and select your blog you have a menu on the left. Click Templates. Your RSS templates will be in the upper list. I currently have 4 (though I’ll have more by the time this article is done):
RSD rsd.xml Yes
RSS 0.91 Index index.xml Yes
RSS 1.0 Index index.rdf Yes
RSS 2.0 Feed index.xml Yes
As you can see, I have 4 feeds, all of which are updated whenever the Indexes are updated.
I will give you the code for our final feeds later on, and I’ll also clean up the feeds on my end of things to make it simpler for my users.
back to top
A Simple RSS File
Here is an example of a simple RSS template, from within MovableType. We’ll dissect this as a basis for understanding how the format works, and how to build our own customized feeds:
click here to see the code
This might be a bit complex, but I’ve tried to format it so that it’s easier to read.
There are 3 distinct parts to an RSS document, and I’ve tried to put each of them in bold for you. The first is the XML Declarations. You can basically ignore these completely, though they are unique for each RSS format (so make sure you have the right format for the right template). This just gives applications the info they need about your file and feed.
The second is the Channel information. This is the generic information specific to your blog. What’s the title, who wrote it, what language is it in, that kind of thing. If you’re using MovableType you’ll be able to basically keep this the same (with the exception of the Webmaster Email Address).
The third is the actual post entries. In this example I am only including some very basic information:
- Title
- Description
- Actual Entry (in this case, a full entry)
- Link
- Subject
- Creator
- Date
So, this is a basic RSS file. We’ll get into more on how to have shorter file versions, how to include comments, full HTML, etc.
back to top
RSS Feed List
As far as I can tell, there are several types of RSS feeds you may want, at a bare minimum:
- titles
- titles with comments
- exerpts
- exerpts with comments
- full entry
- full entry with comments
You may want to get fancy with categorical RSS feeds and so on, but for now, these should fulfill most people’s needs.
back to top
RSS Versions
There are more version of RSS than you can shake a stick at. The single most important thing to remember about RSS versions:
The version numbers mean nothing
For most applications, 0.91 is more advanced than 0.5, and 2.0 is more advanced than 0.8… In RSS this isn’t the case, generally speaking each ‘version’ is like a whole other specification. Not better. Not worse. Just different. Therefore, you’ll often have to make a choice about what version you want to publish (there is generally no need to publish more than one version, as all major readers can read all the major RSS versions).
For more information on RSS versions, there is a fantastic page by Microsoft which is well worth the read, specifically “Which RSS version is the most current?” and “What do RSS 1.0 and 2.0 look like?“.
back to top
Example Full Feed
Here is the code currently in use at Ensight for a fully featured feed, with comments:
click here to see the code
back to top
The Templates
[ I will be inserting roughly 10-20 templates here in the coming weeks. please be patient, or visit the Resources section for existing templates from other authors ]
Resources
Microsoft XML Primer
Jon’s Templates ( more )
Build & Learn RSS
History of RSS