Adding an RSS feed to your site

A few months ago, I thought I was “back” to blogging, but it turns out I still had some unresolved issues. I’ve had a lot of trouble lately getting online to post to this blog and continue my explorations of all things Web-related. Fortunately, however, I think I’m finally ready to get back online on a regular basis to keep all of the tips and tricks coming here on The Web for You. I’m not making any promises at this point, but I’ll do my best.

In my last post, I told you I’d be describing how to add an RSS feed to your Web site. When I first conceived of this project several months ago, I wasn’t sure how to proceed. For one thing, Microsoft Office Small Business Live (MOSBL – formerly Microsoft Office Live) had several restrictions in place that made it difficult to add an RSS feed to your site. While several of these restrictions may still be in place if you’re using the default Web page editor, the good news is that even the free (Basic) version of MOSBL now allows you to use “third-party” design tools to build your site. That means that you’re no longer restricted to using only the existing design tool, and you can write your own HTML codes, including the META tags needed to add an RSS feed to your site (more on this later in this post).

Aside from the design issues with MOSBL, I was still at a loss with how to proceed. I came up with several ideas to use Web-based RSS-creation tools (such as the now-defunct FeedCraft as well as my favorite app, Zoho Creator). Unfortunately, both had serious drawbacks. FeedCraft, when it was available, only permitted users to create a single RSS feed. This was workable, but not ideal. Zoho Creator worked well, but unfortunately the links would only take you to the Zoho Creator record view, and not directly to the page referenced in the feed. Due to these drawbacks, I started experimenting with several offline feed creation tools, such as ListGarden (A very handy, free, and portable application that allows you to easily create both an RSS feed and an HTML version of the feed to display on your site). While these worked adequately, they all shared one common flaw…I had to manually upload the RSS feed to my Web site every time I modified it.

At long last, I realized that I was wasting my time. The simplest (and most efficient) tool for creating an RSS feed was right under my nose from the very beginning…Del.icio.us. I imagine most of you are familiar with del.icio.us, but in case you aren’t, it’s one of the first and most successful social bookmarking sites around. Del.icio.us allows you to quickly and easily bookmark any Web page and tag it with any tag you want. The piece that I was forgetting about was that del.icio.us allows you to turn any tag (or your entire set of bookmarks) into an RSS feed automatically. After spending long hours with other solutions, I finally realized that I had the perfect tool to build an RSS feed for my Web site with my old friend, del.icio.us.

Getting started is simple…if you don’t already have a del.icio.us account, sign up for one at http://del.icio.us/ (free). To make things easier for you, del.icio.us offers you “browser buttons” – links you can add to your bookmarks that allow you to add new items to your del.icio.us favorites with just one click. Alternatively, you can manually add a favorite by clicking on the “new post” link. There are a few fields you need to fill in (filled in automatically if you use the browser buttons): The link URL, a name for the link, a description, and your tag(s). The first two are self-explanatory, but the description is the field where you can enter the text you want your readers to see when they click on or subscribe to your feed (sadly, there is a limit to the number of characters available, and it only supports plain text). The tags are where things get really useful. Create a tag that matches the name or title of your RSS feed, and that’s easy to remember (I might use LWHRSS for “Lockworld Herald RSS feed”). Once you have at least one item bookmarked, you can get the RSS feed link by going to del.icio.us/{username}/{tagname} and looking for the “RSS” link near the bottom of the page.

TIP: If you want to offer multiple RSS feed options, just create different tags to signify the different feeds. The nice thing is that you can add a new item simultaneously to as many of your feeds as you want just by adding the tag for each of your feeds to the same item.

Once you have the link, you’re ready to get going. But I’d recommend adding at least one extra step before you publicize your feed…connect it to FeedBurner to track your subscribers and allow people to subscribe in any reader or via e-mail. That way, you can keep an eye on how many people are subscribed to your RSS feed at any point in time.

Setting up FeedBurner is as easy as creating a del.icio.us account. Simply log in or create a new account, then enter the URL of your RSS feed (the one you copied from your del.icio.us page) into the “Burn a feed right this instant” section. You will have to enter a feed title, so pick something short for your feed title (For example, this feed’s title is the easy-to-remember TheWebForYou. This will form the basis of your feed’s new URL (for example, http://feeds.feedburner.com/TheWebForYou). Once you’ve added this feed to FeedBurner, you will be able to generate a new, unique URL for your feed. This FeedBurner-based URL is the one you want to distribute to people, as it allows FeedBurner to track how many subscribers you have.

Once you have your new feed’s URL, you’re ready to add it to your Web site. The simplest way to do this is to just add a link to it on one of your Web pages. However, many modern browsers offer the ability to “auto-find” RSS feeds on a site. This is based on a META tag added to the HEAD section of the page’s HTML contents. For example, I’ve added the following META tag to each of my pages:

<link rel=”alternate” type=”application/rss+xml” title=”The Web for You (Blog)” href=”http://feeds.feedburner.com/TheWebForYou”>

The “rel” and “type” arguments should not be changed, but the “title” and “href” arguments should be customized to your new feed’s title and URL, respectively.

I’ve used one of my content management systems (ajaxincludes) to add this code (along with similar codes for each of my RSS feeds) to every page of my site automatically. First, I created all of the codes in a separate file, called inc-meta.inc (you can name it anything you want). Then, I used the AjaxIncludes script to dynamically add this to every page in my site using:

<script src=”/documents/script-ajaxinclude.txt”></script>
<script>
ajaxincludes=”inc-meta.inc”
</script>

In this example, I have the main AjaxIncludes script stored in a separate file on my site at http://lockworldherald.com/documents/script-ajaxinclude.txt (Note: I use the .txt extension because of a javascript-caching restriction with MOSBL that prevents changes in javascript codes from showing up on the site immediately. You can use either the standard .js extension or the .txt extension).

By adding these few lines of script to every page of my site, I’ve enabled most browsers to auto-discover the RSS feeds I currently have to offer. And if I need to add or delete a feed, I only have to edit one file: inc-meta.inc.

By creating your RSS feed using del.icio.us, redirected through FeedBurner, and auto-detected on your site, you enable your visitors to quickly and easily subscribe to your feed using almost any browser, RSS reader, or even e-mail. The whole point of RSS is making it easy for your users to find and subscribe to your feed, and this serves the purpose quite well.

By using del.icio.us to add feed items, you have a quick and easy way to turn links to any Web page (or file, such as a PDF) into a custom RSS feed for your site.

TIP: Want to add an item to your RSS feed, but aren’t quite ready to make it visible to the whole world? You can either create a separate tag called “RSSDrafts” (or something similar that works for you), or just check the “make private” link when you add the bookmark. This will allow you to add the bookmark whenever you want, but wait to publish it until the time is right.

That’s all for today. See you next time (hopefully soon) here on The Web for You.

Leave a Reply

Your email address will not be published. Required fields are marked *