Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metalsmith/rss
Metalsmith plugin to generate an rss feed
https://github.com/metalsmith/rss
feed metalsmith metalsmith-plugin rss rss-feed
Last synced: about 3 hours ago
JSON representation
Metalsmith plugin to generate an rss feed
- Host: GitHub
- URL: https://github.com/metalsmith/rss
- Owner: metalsmith
- License: mit
- Created: 2015-05-01T06:22:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T13:56:33.000Z (over 1 year ago)
- Last Synced: 2024-09-18T09:27:49.682Z (about 2 months ago)
- Topics: feed, metalsmith, metalsmith-plugin, rss, rss-feed
- Language: JavaScript
- Homepage:
- Size: 640 KB
- Stars: 9
- Watchers: 3
- Forks: 8
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @metalsmith/rss
[![npm version][npm-badge]][npm-url]
[![ci: build][ci-badge]][ci-url]
[![metalsmith: plugin][metalsmith-badge]][metalsmith-url]> Metalsmith plugin to generate rss feed
## Installation
```console
$ npm install @metalsmith/rss
```## Usage
```js
import Metalsmith from 'metalsmith'
import collections from 'metalsmith-collections'
import rss from '@metalsmith/rss'new Metalsmith('./')
.use(
collections({
//...
})
)
.use(
rss({
feedOptions: {
title: 'test',
site_url: 'http://test.test'
}
})
)
.build((err) => {
if (err) {
throw err
}
})
```### Options
#### `feedOptions`
[RSS options](https://github.com/dylang/node-rss)
`site_url` is mandatory.
#### `collection` (default: `"posts"`)
Collection to use
#### `limit` (default: `20`)
Limit of items to put in the rss feed
#### `encoding` (default: `"utf8"`)
RSS encoding
### `destination` (default: `"rss.xml"`)
Destination of the rss feed
## [Changelog](CHANGELOG.md)
## [License](LICENSE)
[npm-badge]: https://img.shields.io/npm/v/@metalsmith/rss.svg
[npm-url]: https://www.npmjs.com/package/@metalsmith/rss
[metalsmith-badge]: https://img.shields.io/badge/metalsmith-plugin-green.svg?longCache=true
[metalsmith-url]: http://metalsmith.io