Package Exports
- @11ty/eleventy-plugin-rss
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@11ty/eleventy-plugin-rss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eleventy-plugins-rss
A pack of Eleventy plugins for generating an RSS feed using the Nunjucks templating engine.
Installation
Available on npm.
npm install @11ty/eleventy-plugin-rss --saveOpen up your Eleventy config file (probably .eleventy.js) and use addPlugin:
const pluginRss = require("@11ty/eleventy-plugin-rss");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(pluginRss);
};Read more about Eleventy plugins.
Usage
See sample/feed.njk for an example RSS (actually Atom ¯\_(ツ)_/¯) feed template.
Supplies: Nunjucks Filters
rssLastUpdatedDate: Gets the most recently updated content in the collection and retrieves the properly formatted Date for the top-level<updated>element.rssDate: format a Date to be used for individual<entry><updated>elements.absoluteUrl: converts a single URL (relative or absolute path) to a full absolute URL including protocol, domain, full path.htmlToAbsoluteUrls: transforms all of the URLs in a block of HTML withabsoluteUrlabove. Uses posthtml-urls witha[href],video[src],audio[src],source,img[src],[srcset]and a whole bunch more.