Added support for PubSubHubbub hub

This commit is contained in:
Andris Reinman
2014-01-18 16:01:38 +02:00
parent 2b9d4fa2ce
commit ede637b633
2 changed files with 30 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ function RSS (options, items) {
this.author = options.author;
this.categories = options.categories;
this.pubDate = options.pubDate;
this.hub = options.hub;
this.docs = options.docs;
this.copyright = options.copyright;
this.language = options.language;
@@ -82,6 +83,7 @@ function generateXML (data){
ifTruePush(data.webMaster, channel, { 'webMaster': { _cdata: data.webMaster } });
ifTruePush(data.docs, channel, { 'docs': data.docs });
ifTruePush(data.ttl, channel, { 'ttl': data.ttl });
ifTruePush(data.hub, channel, { 'atom:link': { _attr: { href: data.hub, rel: 'hub' } } });
if (data.categories) {
data.categories.forEach(function(category) {