If I have multiple blogs on a website, how should I do the rss feed(s)?
Mainly, If I have multiple blogs on a website, should each blog have its own separate rss xml file, or should they all go into one rss xml file but in different channel nodes? The number of blogs that may end up on the site is unpredictable. It seems like it would be more ef开发者_开发百科fecient to have separate files for each blog, although if that is the case, what are separate channel nodes truely intended for? Any insight would be greatly appreciated. Thanks!
None of the versions of RSS support multiple channel elements per XML file, and I've never seen such a thing in the wild. I'd be impressed to see any example anywhere.
The channel element exists because it was necessary to make the (completely obsolete) RSS version 0.9 be RDF compatible. When Netscape rewrote the spec and dropped RDF in RSS 0.91, the channel element lived on as an entirely pointless wrapper element.
In answer to the original question, you should probably provide both a feed of all posts on the site, and a feed for each blog, so that users have a choice.
I think the general rule of thumb is one rss feed per blog. I think the channel nodes are for larger blogs that can specify different sections of content within the blog.
you can always have 1 feed for all the blogs and use channel to separate the feeds out /feed.xml and then give each blog its own feed in /feeds/blog.xml
精彩评论