Exposing an RSS from the blog module?

Topics: General
Mar 8, 2011 at 5:44 PM

With the default installation of Orchard and the built in blog module, how can I get to the blog contents as an RSS feed? 

Is it just that the link is not shown by default as in http://orchard.codeplex.com/discussions/232188 ?

Mar 8, 2011 at 5:57 PM

There is no need for a link (althoug one could build one in any template, or as a widget). What counts is that the required link tag can be found in the head section of the HTML. This way, you can point any RSS reader and it should find the feed automatically.

Mar 8, 2011 at 5:59 PM
Edited Mar 8, 2011 at 6:02 PM

Pretend for just a moment that I have less than one hour of experience using Orchard. Could you explain that to me again? Assuming of course the limited Orchard experience we are pretending I have :-)

For example, if I wanted to make a link in my template, how would I format the URL?

Mar 8, 2011 at 6:04 PM

I have an orchard site with a blog setup running in ASP.NET server.  

Its URL is as follows:


I would like to see the posts to this blog in RSS.  I would assume I could visit a URL like this:


Or...whatever the URL convention is.  I just need to know what that URL convention is, if it exists, if there's a way to set it up, etc.

Mar 8, 2011 at 6:15 PM

The standard way of specifying that a feed exists for a page is to put a special tag in the head section of the HTML for that page. If you view source on any blog, you'll see something like this:

<link rel="alternate" type="application/rss+xml" title="VuLu" href="/rss?containerid=13" />

Rss readers know to look for that special tag and to get the feed's address from there.

The URL convention is not just to add /rss because there might be more than one feed per document (news, comments, etc.). As you can see, the URL of the feed also has the id of the container for which to generate RSS.

Details about the implementation can be found here: http://weblogs.asp.net/bleroy/archive/2010/04/07/rss-feeds-in-orchard.aspx

Mar 8, 2011 at 6:21 PM

Thanks. I found http://orchard.codeplex.com/discussions/242274 which explained this as well.

Doesn't this make the link of my RSS feeds brittle? Are container IDs immutable? Assume my blog is popular and lots of people subscribe to it via that URL that contains /rss?containerid=13, then I reorganize my site. Could the containerid change? Wouldn't that break all the Rss subscriptions?

Mar 8, 2011 at 6:31 PM

That's a fair point and a common practice is actually to use Feedburner as a permanent address for your feeds. This way, you could even move to a new domain and keep your subscribers. I think we need a Feeburner module that automates this task by the way... Any takers?

Mar 8, 2011 at 6:42 PM

Or Rewrite Module would solve my problem too - http://www.dotnetguru2.org/sebastienros/index.php/2011/02/16/rewrite-module

Mar 8, 2011 at 7:00 PM

Wait, one more concern about this.

The <link> tag in my page header is autogenerated by Orchard. How would I override the href in that tag to point feed readers at my FeedBurner feed?

Mar 10, 2011 at 10:03 PM

I need to look into that. A Feedburner module might come out of it actually...

Mar 10, 2011 at 10:09 PM

Perhaps a module that supports RSS should let you create a "public URL" for the RSS feed. Then URL rewrite rules can be automatically set up to route any requests to the specified public URL to the internal URL that specifies the container ID parameter. Then the "Public URL" could be used in the Header's <Link> tag and any other places where a public immutable URL is needed to represent the feed. 

Apr 22, 2011 at 6:16 AM

I just published this: http://orchardproject.net/gallery/List/Modules/Orchard.Module.Vandelay.Feedburner/1.0