RSS generator plugin for Assemble, the static site generator for Yeoman, Grunt.js and Node.js.
Contributing
Find a bug? Have a feature request? Please create an Issue.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality,
and run docs
in the command line to build the docs with Verb.
Pull requests are also encouraged, and if you find this project useful please consider "starring" it to show your support! Thanks!
Quickstart
From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:
npm install assemble-contrib-rss --save-dev
Next add assemble-contrib-rss
, the name of this module, to the plugins
option in the Assemble task:
module.exports = function(grunt) {
grunt.initConfig({
assemble: {
options: {
plugins: ['assemble-contrib-rss'],
rss: {
}
},
...
}
});
};
See the options for further configuration.
Options
The following RSS elements can be defined in the options, as follows:
assemble: {
options: {
rss: {
category: ['foo'],
title: 'Assemble',
}
}
}
These options will be used within the RSS <channel>
element.
Required Options:
title
: Defines the title of the channeldescription
: Describes the channellink
: Defines the hyperlink to the channel
Other Options:
category
: Defines one or more categories for the feedcloud
: Register processes to be notified immediately of updates of the feedcopyright
: Notifies about copyrighted materialdocs
: Specifies an URL to the documentation of the format used in the feedgenerator
: Specifies the program used to generate the feedimage
: Allows an image to be displayed when aggregators present a feedlanguage
: Specifies the language the feed is written inlastBuildDate
: Defines the last-modified date of the content of the feedmanagingEditor
: Defines the e-mail address to the editor of the content of the feedpubDate
: Defines the last publication date for the content of the feedrating
: The PICS rating of the feedskipDays
: Specifies the days where aggregators should skip updating the feedskipHours
: Specifies the hours where aggregators should skip updating the feedtextInput
: pecifies a text input field that should be displayed with the feedttl
: Specifies the number of minutes the feed can stay cached before refreshing it from the sourcewebMaster
: Defines the e-mail address to the webmaster of the feed
RSS item
Element
In addition, you can define item defaults, but you can also define these in the YAML front matter of each page.
assemble: {
options: {
rss: {
items: {
title: 'Assemble',
description: 'Static site generator for Node.js',
link: 'http://assemble.io'
}
}
}
}
Required Options:
title
: Defines the title of the itemdescription
: Describes the itemlink
: Defines the hyperlink to the item
Other Options:
author
: Specifies the e-mail address to the author of the itemcategory
: Defines one or more categories the item belongs tocomments
: Allows an item to link to comments about that itemenclosure
: Allows a media file to be included with the itemguid
: Defines a unique identifier for the itempubDate
: Defines the last-publication date for the itemsource
: Specifies a third-party source for the item
Usage Examples
options: {
rss: {},
files: {
'./blog/': ['./templates/blog/*.hbs']
}
}
nothing yet.
Authors
Jon Schlinkert
Patrick Burtchaell
License
Copyright (c) 2014 Jon Schlinkert (https://github.com/jonschlinkert), contributors.
Released under the MIT license