Coder Social home page Coder Social logo

brettmn / eleventy-plugin-rss Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 11ty/eleventy-plugin-rss

0.0 1.0 0.0 14 KB

A pack of Eleventy plugins for generating an RSS feed.

Home Page: https://www.11ty.io/

License: MIT License

JavaScript 100.00%

eleventy-plugin-rss's Introduction

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 --save

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 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 with absoluteUrl above. Uses posthtml-urls with a[href], video[src], audio[src], source, img[src], [srcset] and a whole bunch more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.