Socket
Socket
Sign inDemoInstall

@11ty/eleventy-plugin-rss

Package Overview
Dependencies
3
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @11ty/eleventy-plugin-rss

A pack of Eleventy plugins for generating an RSS feed using the Nunjucks templating engine.


Version published
Maintainers
1
Created

Readme

Source

eleventy-plugin-rss

A pack of Eleventy plugins for generating Atom and JSON feeds using the Nunjucks templating engine.

Note: the plugin is called RSS but does not technically include an example of an RSS feed. Generally feed readers that support RSS also support Atom. If you’d like to contribute an example, a pull request would be welcome!

Installation

Available on npm.

npm install @11ty/eleventy-plugin-rss --save-dev

Open 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 Atom feed template or sample/feed.json for an example JSON 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 with absoluteUrl above. Uses posthtml-urls with a[href], video[src], audio[src], source, img[src], [srcset] and a whole bunch more.

Keywords

FAQs

Last updated on 27 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc