I can't figure out how to use feedr to parse a normal rss-feed like http://mashable.com/feed/.
How do I parse the feed? The documentation is quite poor. The twitter-example doesn't help me. For example I would like to grab a feed and show its content in a way like this:
<ul>
<li><a href="link-to-posting">Post Title</a> – Post Content</li>
</ul>
Any suggestions?
The feedr plugin just turns any json or xml into a javascript object that you can use in pages. So with RSS feeds, you'll end up with an object that has properties that match the XML in the rss feed with elements becoming objects, etc. So there will be a channel object and then under that an array of item objects, etc...
Here's how your mashable example would work. Put this in the docpad.coffee configuration:
plugins:
feedr:
feeds:
mashable:
url: 'http://mashable.com/feed/'
Then, you can use the @feedr.feeds.mashable
object in a page like this:
<ul>
<% for item in @feedr.feeds.mashable.channel.item: %>
<li><a href="<%= item.link %>"><%= item.title %></a> - <%- item.description %></li>
<% end %>
</ul>