1.0.1 • Published 5 years ago
@metalsmith/rss v1.0.1
@metalsmith/rss
Metalsmith plugin to generate rss feed
Installation
$ npm install @metalsmith/rssUsage
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
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
License
1.0.1
5 years ago