apostrophe-global-rss-feed
v0.5.10
Published
Adds a route to your site that performs an apos.get and returns an XML feed of the results
Downloads
5
Readme
apostrophe-global-rss-feed
Hold up, I already have RSS feeds, right?
You do, Apostrophe natively creates RSS feeds out of snippet'y thing and even lets you filter them. This module exposes a route that makes a generic apos.get call on the aposPages collection that allows the results of the feed to be a mix of content types, which Apostrophe doesn't do by default.
Usage
var site = require('apostrophe-site')({
modules: {
'apostrophe-global-rss-feed': {
description: 'foo' // optional description attached to all feeds
route: '/feed/' // optional route where the feeds like, default is /apos-global-rss-feed/
sort: { start: -1, publishedAt: -1, createdAt: -1 } // optional, mongo sort object, default { start: -1, publishedAt: -1, createdAt: -1 }
limit: 50 // optional, integer limit, default 100
},
}
})
Resource Format
The module has a whitelist of resources it will run an apos.get against, otherwise it will return a 405 Method Not Allowed
. The current array of allowed resources are ['tag', 'id', 'slug']
. All resources need an identifier for search against, otherwise 400 Bad Request is thrown
.
A properly formatted request looks like /apos-global-rss-feed/tag/fashion-design