mirror of
https://github.com/LightAir/turbo-rss.git
synced 2026-02-04 12:06:20 +00:00
Adding Generator Option
This commit is contained in:
@@ -11,6 +11,7 @@ function RSS (options, items) {
|
||||
|
||||
this.title = options.title || 'Untitled RSS Feed';
|
||||
this.description = options.description || '';
|
||||
this.generator = options.generator || 'NodeJS RSS Module';
|
||||
this.feed_url = options.feed_url;
|
||||
this.site_url = options.site_url;
|
||||
this.image_url = options.image_url;
|
||||
@@ -66,7 +67,7 @@ function generateXML (data){
|
||||
if (data.image_url) {
|
||||
channel.push({ image: [ {url: data.image_url}, {title: data.title}, {link: data.site_url} ] });
|
||||
}
|
||||
channel.push({ generator: 'NodeJS RSS Module' });
|
||||
channel.push({ generator: data.generator });
|
||||
channel.push({ lastBuildDate: new Date().toGMTString() });
|
||||
|
||||
ifTruePush(data.feed_url, channel, { 'atom:link': { _attr: { href: data.feed_url, rel: 'self', type: 'application/rss+xml' } } });
|
||||
|
||||
Reference in New Issue
Block a user