About a month ago I broke my blog out into multiple feeds to accommodate readers and pals who don't have a need for all of the Community Server information that streams out of dbvt.com. (Sad, but true.) I also added a separate blog on running at the time, so it seemed a good time for a New DBVT Feed Lineup.
What I did essentially was add two feeds to my main blog content: a feed of only Community Server posts and a feed with all other post categories--.NET, iPod and Dog, Dear Diary, Geek Smatterings and Nordic Track Reads. The main feed is still available, of course. These are additional feeds only.
In this post I want to describe how to break-up a single blog feed into multiple content-specific feeds using Community Server Mirrored Blogs. The feed I'll be using to demonstrate this will be the feed of my main blog containing all non-Community Server categories.
To create a feed consisting of multiple categories we start with creating a new blog, which I'm calling my Everyday Blog. Next we add the Mirrors to individual post categories of the blog.
Okay, not much to that. Now, what happens when people click to the post from their readers to add a comment? The address of the blog is http://dbvt.com/everyday/default.aspx and the feed is http://dbvt.com/everyday/rss.aspx. We don't want people commenting on the Everyday blog. We want all website reading and commenting to take place on the main blog. To make that happen we add a simple redirect in the View-Post.ascx template.
protected override void OnLoad (EventArgs e)
{
if (CommunityServer.Components.CSContext.Current.ApplicationKey == "dave_burke_everyday")
{
string _url = CommunityServer.Components.CSContext.Current.RawUrl.Replace("/everyday", "/blog");
Response.Redirect(_url);
}
}
The final step in configuring the Everyday Blog is to set it to Autoname posts. To avoid any errors on redirection, the Main Blog we're breaking-up needs to have Autoname enabled as well, since the post name serves as the redirection key. I mentioned having to "seed" the Everyday blog feed when I initially described the new feed lineup, which is why I only made the link available tonight, weeks after creating it. The feed itself works great from the git-go, but to enable redirection back to my Main Blog, the date-based CS urls had to be the same on both blogs when the post was created.
I added an /everyday directory with a placemarker default.aspx in it for the final step. No need for duplicating the /themes directory or anything else. The only purpose of the Everyday Feed is to display the content in the newsreader and direct readers back to our main blog.
The new RSS Options page completes the mod, and is shown below.
