npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

assemble-middleware-rss

v0.2.5

Published

RSS generator plugin for Assemble.

Downloads

23

Readme

assemble-middleware-rss NPM version Build Status

RSS generator plugin for Assemble.

Quickstart

From the same directory as your project's gruntfile and [package.json][], install this plugin:

npm install assemble-middleware-rss --save-dev

Next add assemble-middleware-rss, the name of this module, to the plugins option in the Assemble task:

options: {
  plugins: ['assemble-middleware-rss'],
  rss: {
    title: 'RSS Feed Title',
    description: 'RSS feed description.'
  }
}

Note: Author is also required, but it is pulled from package.json by default. As long as you have a package.json file in the root directory, you don't need to include author in the options.

See the options for further configuration.

Options

Plugin Options

| Option | Type | Description | Default Value |
|:----------|:-------:|------------------------------------------|---------------| | format | boolean | Format output XML file using js-prettify | false | | dest | string | Destination and filename of the generated RSS feed |'feed.xml' |

RSS Feed Data

Data for the RSS <channel> element.

This data is defined under the plugin configuration.

assemble: {
  options: {
    rss: {
      title: 'foo',
      description: 'bar'
    }
  }
}

| Required | Type | Desciption | Default Value |
|:-------------|:------:|--------------------------------------|----------------:| | title | string | Defines the title of the channel | pkg.name | | description| string | Describes the channel | pkg.description | | link | string | Defines the hyperlink to the channel | pkg.homepage |

| Optional | Type | Description | Default Value | |:----------------|:------:|-------------|--------------:| | categories | array | Defines one or more categories for the feed | | cloud | string | Register processes to be notified immediately of updates of the feed | | | copyright | string | Notifies about copyrighted material | | docs | string | Specifies an URL to the documentation of the format used in the feed | | generator | string | Specifies the program used to generate the feed | | image | string | Allows an image to be displayed when aggregators present a feed | | language | string | Specifies the language the feed is written in | 'en' | lastBuildDate | string | Defines the last-modified date of the content of the feed | | managingEditor| string | Defines the e-mail address to the editor of the content of the feed | | pubDate | string | Defines the last publication date for the content of the feed | | rating | string | The PICS rating of the feed | | skipDays | string | Specifies the days where aggregators should skip updating the feed | | skipHours | string | Specifies the hours where aggregators should skip updating the feed | | textInput | string | pecifies a text input field that should be displayed with the feed | | ttl | string | Specifies the number of minutes the feed can stay cached | '60' | | webmaster | string | Defines the email address to the webmaster of the feed | | geoRSS | boolean| Enable or disable GeoRSS | false

RSS Item Data

Data for the RSS <item>element(s).

The data for feed items is generally grabbed from the YAML Front Matter.

title: Foo
desciption: This is foo.

Three values are required for the RSS feed to generate:

| Value | Type | Description |
|:--------------|:------:|---------------------------------------------------| | title | string | Defines the title of the item | | description | string | Describes the item |

All other values are optional:

| Value | Type | Desciption |
|:--------------|:------:|--------------------------------------------------------| | author | string | Specifies the e-mail address to the author of the item | | date | string | Defines the last-publication date for the item | | link | string | Defines the hyperlink to the item | | categories | string | Defines one or more categories the item belongs to | | comments | string | Allows an item to link to comments about that item | | guid | string | Defines a unique identifier for the item | | source | string | Specifies a third-party source for the item | | lat | number | The latitude coordinate of the item | | long | number | The longitude coordinate of the item |

Excluding content

Both published: false and rss: false will exclude an item from the feed. However, note that published: false will entirely prevent a page from being assembled.

Usage Examples

Generate feed using only required options.

options: {
  rss: {
    title: 'RSS feed description.',
    description: 'RSS feed description.'
  }
}

RSS Specifications

RSS Feed

The RSS feed is generated using the RSS module, a fast and simple RSS generator/builder for Node projects by Dylan Greene. Some of the options this module has are not fully documented here, but are availabe; the information you might need should be with in Greene's documentation.

The content for the RSS feed is pulled from several sources.

As much of the content for the feed as possible is pulled from package.json, e.g. the author name and email; the site name and url. This functionality can be overidden by specifying the feed data in the plugin configuartion. See the options documentaion.

RSS Feed Items

The data for each item is pulled from YAML Front Matter (YFM).

title: foo
desciption: bar

If you do not want to include a page in the RSS feed, you don't have to.

rss: false

The item data you can define in the YFM is listed under the options


Built with care by Patrick Burtchaell in New Orleans.

Copyright (c) 2014 Patrick Burtchaell, Jon Schlinkert, contributors. Released under the MIT license.