Wednesday, October 21, 2009

RSS Feed Template

When we designed the new version of our church home page, we constructed a page where we collect sermons. It turns out that this page, and the associated sermons, gets hit a lot. I've been told that the hits match the biblical texts specified by the liturgical calendar for upcoming Sundays, which suggests that most of the traffic is pastors looking for sermon ideas.

Nevertheless, it's useful for a congregation to put its sermons on the web, because, let's face it, the sermon is the biggest chunk of time in a service, and is most likely to give you an idea of the church's, or at least the pastor's, theology. So we want to publicize the sermons as widely as possible.

One way to do this is to construct an RSS Feed. Once you have one, people can link to it as, say, a Live Bookmark, or with a feed aggregator. You can also export the feed to other sites. For example, we've set up a church newsletter blog, and you'll see the titles of the last few sermons on the right-hand side.

Setting up an RSS feed isn't all that hard. I was able to do it using the prescription in Elizabeth Castro's HTML, XHTML & CSS, with a few modifications needed to get the thing to properly validate. I'm putting a template for the feed reader here, as much for my use as anyone else's:

<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:atom="">


<title>Feed Title</title>

<!-- Link to feed homepage: -->


<!-- Address of this RSS file: -->

<atom:link href="" rel="self" type="application/rss+xml" />

<description>This is where you put a description of your feed.</description>

<!-- It's in English (or whatever) -->


<!-- Email address -->


<!-- Copyright notice -->

<copyright>Copyright 2009 by Joe Shlabotnik. All Rights Reserved.</copyright>

<!-- Categories for this feed -->

<category>Dummy 1</category>

<category>Dummy 2</category>

<!-- Publication date of last blog entry -->

<!-- Note the syntax on all dates -->

<pubDate>Sun, 11 Oct 2009 18:00:00 EDT</pubDate>

<!-- When you actually built the thing -->

<lastBuildDate>Mon, 12 Oct 2009 12:40:00 EDT</lastBuildDate>

<!-- How long until the next update (minutes) -->


<!-- Individual Entries.  Repeat as Necessary -->


<!-- Address of article: -->


  <title>Article Title</title>
    Description of the article, as shown in an RSS reader.  Note that this can be the entire article, if you're so inclined.

<!-- Permanent address of article.  In most cases this will be the same as the link above -->

  <guid isPermaLink="true"></guid>

<!-- Publication date of this article -->

  <pubDate>Sun, 11 Oct 2009 18:00:00 EDT</pubDate>
<!-- finish it up -->


<!-- And after all the items, close out the file -->



Fill in the blanks, add a new <item> </item> for each entry in your feed, and you're ready to go.

Well, not quite. You'll note that if you go to the sermon page, there's a little icon on the address bar that indicates a live bookmark/RSS feed is available for that page. To get Firefox/IE/etc. to do this, you need to put a line such as:

<link rel="alternate"
title="Our RSS Feed"
href="" />

in your HTML file. Then the browser will know that a feed is available.