Black Lives Matter The Equal Justice Initiative We The Protesters Delete Facebook
Eleventy The possum is Eleventy’s mascot

Eleventy Documentation


RSS Plugin #

A pack of plugins for generating an RSS feed (actually an Atom feed, but who’s counting) using the Nunjucks templating engine.

Template Compatibility #

Installation #

Available on npm.

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

Open up your Eleventy config file (probably .eleventy.js) and use addPlugin:

Filename .eleventy.js
const pluginRss = require("@11ty/eleventy-plugin-rss");
module.exports = function(eleventyConfig) {

Supplies the following Nunjucks Filters #

Sample Atom Feed template #

Copy and paste this template and modify the JSON metadata to match your feed’s needs. Make sure collections.posts matches the template collection you want to provide a feed for.

"permalink": "feed.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "My Blog about Boats",
"subtitle": "I am writing about my experiences as a naval navel-gazer.",
"url": "",
"feedUrl": "",
"author": {
"name": "Boaty McBoatFace",
"email": ""
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.subtitle }}</subtitle>
<link href="{{ metadata.feedUrl }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.posts | rssLastUpdatedDate }}</updated>
<id>{{ metadata.url }}</id>
<name>{{ }}</name>
<email>{{ }}</email>
{%- for post in collections.posts %}
{% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset %}
<title>{{ }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
{%- endfor %}

Place the file anywhere in your project (give it a .njk extension) and it will be transformed into a feed.xml file at the root of your website when Eleventy builds it. It can then be useful to check the file against a feed validator, such as the W3C Feed Validation Service to make sure that the output was good.

Ultimately your feed will be available at

Other pages in Plugins: